Skip to content

Commit 5255f33

Browse files
committed
---
yaml --- r: 218943 b: refs/heads/snap-stage3 c: 0aeb9f6 h: refs/heads/master i: 218941: 069e5a3 218939: ebc60e3 218935: b70db08 218927: 94b4db6 218911: 6ffcb0c 218879: 7a0917d v: v3
1 parent f8e45ab commit 5255f33

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: c044791d80ea0dc5c4b57b6030a67b69f8510239
3-
refs/heads/snap-stage3: fd3b6ca508ed99004a11291ef1d2c64104102a41
3+
refs/heads/snap-stage3: 0aeb9f6f08c353c71d962d5cc7a231e73040ca3c
44
refs/heads/try: b53c0f93eedcdedd4fd89bccc5a3a09d1c5cd23e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/snap-stage3/src/libcollections/linked_list.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,14 @@ impl<T> Rawlink<T> {
106106
/// Convert the `Rawlink` into an Option value
107107
fn resolve_immut<'a>(&self) -> Option<&'a T> {
108108
unsafe {
109-
mem::transmute(self.p.as_ref())
109+
self.p.as_ref()
110110
}
111111
}
112112

113113
/// Convert the `Rawlink` into an Option value
114114
fn resolve<'a>(&mut self) -> Option<&'a mut T> {
115-
if self.p.is_null() {
116-
None
117-
} else {
118-
Some(unsafe { mem::transmute(self.p) })
115+
unsafe {
116+
self.p.as_mut()
119117
}
120118
}
121119

0 commit comments

Comments
 (0)