Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/sexpr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,17 +196,17 @@ impl Arena {

if expr.is_atom() {
// Safety argument: the data will live as long as the containing context, and is
// immutable once it's inserted, so using the lifteime of the Arena is acceptable.
// immutable once it's inserted, so using the lifetime of the Arena is acceptable.
let data = unsafe { std::mem::transmute(inner.strings[expr.index()].as_str()) };
SExprData::Atom(data)
} else if expr.is_list() {
// Safety argument: the data will live as long as the containing context, and is
// immutable once it's inserted, so using the lifteime of the Arena is acceptable.
// immutable once it's inserted, so using the lifetime of the Arena is acceptable.
let data = unsafe { std::mem::transmute(inner.lists[expr.index()].as_slice()) };
SExprData::List(data)
} else if expr.is_string() {
// Safety argument: the data will live as long as the containing context, and is
// immutable once it's inserted, so using the lifteime of the Arena is acceptable.
// immutable once it's inserted, so using the lifetime of the Arena is acceptable.
let data = unsafe { std::mem::transmute(inner.strings[expr.index()].as_str()) };
SExprData::String(data)
} else {
Expand All @@ -221,7 +221,7 @@ impl Arena {

let inner = self.0.borrow();
// Safety argument: the data will live as long as the containing context, and is
// immutable once it's inserted, so using the lifteime of the Arena is acceptable.
// immutable once it's inserted, so using the lifetime of the Arena is acceptable.
let data = unsafe { std::mem::transmute(inner.strings[expr.index()].as_str()) };
Some(data)
}
Expand All @@ -233,7 +233,7 @@ impl Arena {

let inner = self.0.borrow();
// Safety argument: the data will live as long as the containing context, and is
// immutable once it's inserted, so using the lifteime of the Arena is acceptable.
// immutable once it's inserted, so using the lifetime of the Arena is acceptable.
let data = unsafe { std::mem::transmute(inner.strings[expr.index()].as_str()) };
Some(data)
}
Expand All @@ -245,7 +245,7 @@ impl Arena {

let inner = self.0.borrow();
// Safety argument: the data will live as long as the containing context, and is
// immutable once it's inserted, so using the lifteime of the Arena is acceptable.
// immutable once it's inserted, so using the lifetime of the Arena is acceptable.
let data = unsafe { std::mem::transmute(inner.lists[expr.index()].as_slice()) };
return Some(data);
}
Expand Down