Skip to content

Commit 3cb1e9b

Browse files
mxgreyesteve
authored andcommitted
Use nightly for style check (#396)
* Use nightly for style check Signed-off-by: Michael X. Grey <[email protected]> * Install nightly for cargo +nightly fmt Signed-off-by: Michael X. Grey <[email protected]> * Fix style in examples Signed-off-by: Michael X. Grey <[email protected]> * Update style for rosidl_runtime_rs Signed-off-by: Michael X. Grey <[email protected]> * Add a comment indicating that nightly release is needed for formatting Signed-off-by: Michael X. Grey <[email protected]> --------- Signed-off-by: Michael X. Grey <[email protected]>
1 parent 7a07fe6 commit 3cb1e9b

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

rosidl_runtime_rs/src/sequence.rs

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
use std::cmp::Ordering;
2-
use std::fmt::{self, Debug, Display};
3-
use std::hash::{Hash, Hasher};
4-
use std::iter::{Extend, FromIterator, FusedIterator};
5-
use std::ops::{Deref, DerefMut};
1+
use std::{
2+
cmp::Ordering,
3+
fmt::{self, Debug, Display},
4+
hash::{Hash, Hasher},
5+
iter::{Extend, FromIterator, FusedIterator},
6+
ops::{Deref, DerefMut},
7+
};
68

79
#[cfg(feature = "serde")]
810
mod serde;

rosidl_runtime_rs/src/string.rs

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
use std::cmp::Ordering;
2-
use std::ffi::CStr;
3-
use std::fmt::{self, Debug, Display};
4-
use std::hash::{Hash, Hasher};
5-
use std::ops::{Deref, DerefMut};
1+
use std::{
2+
cmp::Ordering,
3+
ffi::CStr,
4+
fmt::{self, Debug, Display},
5+
hash::{Hash, Hasher},
6+
ops::{Deref, DerefMut},
7+
};
68

79
#[cfg(feature = "serde")]
810
mod serde;
911

10-
use crate::sequence::Sequence;
11-
use crate::traits::SequenceAlloc;
12+
use crate::{sequence::Sequence, traits::SequenceAlloc};
1213

1314
/// A zero-terminated UTF-8 string.
1415
///

rosidl_runtime_rs/src/traits.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
// DISTRIBUTION A. Approved for public release; distribution unlimited.
1616
// OPSEC #4584.
1717
//
18-
use std::borrow::Cow;
19-
use std::fmt::Debug;
18+
use std::{borrow::Cow, fmt::Debug};
2019

2120
/// Internal trait that connects a particular `Sequence<T>` instance to generated C functions
2221
/// that allocate and deallocate memory.

0 commit comments

Comments
 (0)