Skip to content

Commit dc5f453

Browse files
committed
Fix CI for drop_guard
1 parent bb82763 commit dc5f453

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

library/core/src/mem/drop_guard.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use core::mem::ManuallyDrop;
2-
use core::ops::{Deref, DerefMut};
3-
use core::ptr;
1+
use crate::mem::ManuallyDrop;
2+
use crate::ops::{Deref, DerefMut};
3+
use crate::ptr;
44

55
/// Wrap a value and run a closure when dropped.
66
///
@@ -52,10 +52,7 @@ where
5252
/// ```
5353
#[unstable(feature = "drop_guard", issue = "none")]
5454
pub fn new(inner: T, f: F) -> Self {
55-
Self {
56-
inner: ManuallyDrop::new(inner),
57-
f: ManuallyDrop::new(f),
58-
}
55+
Self { inner: ManuallyDrop::new(inner), f: ManuallyDrop::new(f) }
5956
}
6057

6158
/// Consumes the `Guard`, returning the wrapped value.
@@ -141,8 +138,9 @@ where
141138
// tests copied from https://docs.rs/scopeguard/latest/src/scopeguard/lib.rs.html#1-595
142139
#[cfg(test)]
143140
mod tests {
141+
use crate::cell::Cell;
142+
144143
use super::*;
145-
use std::cell::Cell;
146144

147145
#[test]
148146
fn test_only_dropped_by_closure_when_run() {

0 commit comments

Comments
 (0)