Skip to content

Commit

Permalink
Inline pointer method wrappers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Huszagh committed Jun 20, 2019
1 parent 5afe4f0 commit 0b22f46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = "MIT/Apache-2.0"
name = "stackvector"
readme = "README.md"
repository = "https://github.com/Alexhuszagh/rust-stackvector"
version = "1.0.5"
version = "1.0.6"
build = "build.rs"

[badges]
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ trait PointerMethods {
}

impl<T> PointerMethods for *const T {
#[inline(always)]
unsafe fn padd(self, count: usize) -> Self {
#[cfg(has_pointer_methods)]
return self.add(count);
Expand All @@ -68,6 +69,7 @@ impl<T> PointerMethods for *const T {
}

impl<T> PointerMethods for *mut T {
#[inline(always)]
unsafe fn padd(self, count: usize) -> Self {
#[cfg(has_pointer_methods)]
return self.add(count);
Expand Down

0 comments on commit 0b22f46

Please sign in to comment.