Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raw buffer access for paths #7201

Closed
emberian opened this issue Jun 17, 2013 · 3 comments
Closed

Raw buffer access for paths #7201

emberian opened this issue Jun 17, 2013 · 3 comments
Labels
A-Unicode Area: Unicode C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@emberian
Copy link
Member

In #7131 it becomes useful to have access to a raw buffer which is the platform's representation of the path for passing to system APIs. I propose a with_platform_buffer() method which returns the appropriate raw buffer. On Windows this would be UTF-16, elsewhere it'd just be bytes.

This could avoid doing allocations in lowlevel APIs which directly pass paths to the system.

@catamorphism
Copy link
Contributor

Seems like a good idea to me.

@catamorphism
Copy link
Contributor

I think this is addressed with the Path rewrite (e.g. ToCStr). Closing; reopen if there's something specific that's not there already.

@emberian
Copy link
Member Author

Yup, the Path rewrite addressed this. Yay progress!

flip1995 pushed a commit to flip1995/rust that referenced this issue May 20, 2021
Remove powi, "square can be computed more efficiently"

powi(2) produces exactly the same native code as x * x
powi was part of the [`suboptimal_flops`] lint

fixes rust-lang#7058
changelog: Remove powi [`suboptimal_flops`], "square can be computed more efficiently"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Unicode Area: Unicode C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

2 participants