Skip to content

Commit 738cef0

Browse files
committed
clippy fixes
1 parent ea03873 commit 738cef0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

wayland-backend/tests/rs_sys_impls.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/// For example, assume you want to make sure both the rust and sys versions of `ObjectId` implement [`Debug`].
1111
/// The following pattern would achieve that check.
1212
///
13-
/// ```
13+
/// ```no_run
1414
/// #[test]
1515
/// fn test() {
1616
/// assert_impl!(server::ObjectId: std::fmt::Debug);
@@ -19,7 +19,7 @@
1919
///
2020
/// Multiple traits may be tested by separating each trait with a comma.
2121
///
22-
/// ```
22+
/// ```no_run
2323
/// #[test]
2424
/// fn test() {
2525
/// assert_impl!(server::ObjectId: std::fmt::Debug, Send, Sync);
@@ -28,7 +28,7 @@
2828
///
2929
/// For the client side, simply change the path before the name of the type.
3030
///
31-
/// ```
31+
/// ```no_run
3232
/// #[test]
3333
/// fn test() {
3434
/// assert_impl!(client::ObjectId: std::fmt::Debug)
@@ -47,7 +47,7 @@
4747
/// Finally, generics may also be tested by simply adding the generics as expected in a normal type. Do note
4848
/// you will need to monomorphize the type with something, such as, `()`, the unit type.
4949
///
50-
/// ```
50+
/// ```no_run
5151
/// #[test]
5252
/// fn test() {
5353
/// assert_impl!(server::Backend<()>: Send, Sync); // No trait

wayland-server/src/socket.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ impl ListeningSocket {
8484
// open the lockfile
8585
_lock = File::options()
8686
.create(true)
87+
.truncate(true)
8788
.read(true)
8889
.write(true)
89-
.truncate(true)
9090
.mode(0o660)
9191
.open(&lock_path)
9292
.map_err(|_| BindError::PermissionDenied)?;

0 commit comments

Comments
 (0)