Skip to content

Commit

Permalink
Fix following rust-lang/rust#42959
Browse files Browse the repository at this point in the history
  • Loading branch information
jonhoo committed Jul 27, 2017
1 parent 0be4124 commit 8ac4cbc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "arccstr"
version = "1.0.1"
version = "1.0.2"

description = "Thread-safe, reference-counted null-terminated immutable strings."
readme = "README.md"
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ impl ArcCStr {
alloc::heap::Heap
.alloc(aul)
.expect("could not allocate memory"),
);
).unwrap();
let cstr = s.as_ptr().offset(aus as isize);
// initialize the AtomicUsize to 1
{
Expand All @@ -231,7 +231,7 @@ impl ArcCStr {
*cstr.offset(buf.len() as isize) = 0u8;
// and we're all good
ArcCStr {
ptr: Shared::new(s.as_ptr().offset(0)),
ptr: Shared::new(s.as_ptr().offset(0)).unwrap(),
}
}

Expand Down

0 comments on commit 8ac4cbc

Please sign in to comment.