Skip to content

Commit fe4b9ae

Browse files
committed
cargo fmt; line wrapping
1 parent 477f292 commit fe4b9ae

2 files changed

Lines changed: 15 additions & 10 deletions

File tree

wgpu-remote/src/transport/local.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,11 @@ impl tp::Sender for LocalSender {
142142
}
143143
}
144144

145-
fn send_message(&mut self, handle: tp::SharedMemoryHandle, range: Range<usize>) -> std::io::Result<()> {
145+
fn send_message(
146+
&mut self,
147+
handle: tp::SharedMemoryHandle,
148+
range: Range<usize>,
149+
) -> std::io::Result<()> {
146150
match self.event_queue.send(Message { handle, range }) {
147151
Ok(()) => Ok(()),
148152
Err(_) => Err(std::io::Error::other(

wgpu-remote/src/transport/mod.rs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ segment on one side are immediately visible on the other.
4141
- [`Sender::allocate_shared_memory`] creates a shared memory segment, and
4242
returns an id by which both counterparts can refer to it.
4343
44-
- [`Sender::send_message`] sends the counterpart a message whose content resides in a
45-
shared memory segment.
44+
- [`Sender::send_message`] sends the counterpart a message whose content resides
45+
in a shared memory segment.
4646
4747
- [`Sender::map_shared_memory`] takes a given shared memory segment and makes
4848
it visible in the caller's address space.
@@ -129,8 +129,8 @@ pub trait Sender {
129129
/// Close `handle`.
130130
///
131131
/// After this call, `handle` may no longer be passed to
132-
/// [`map_shared_memory`] or [`send_message`] in this `Sender`. This has no effect
133-
/// on our counterpart's ability to use `handle` with their `Sender`.
132+
/// [`map_shared_memory`] or [`send_message`] in this `Sender`. This has no
133+
/// effect on our counterpart's ability to use `handle` with their `Sender`.
134134
///
135135
/// Closing `handle` does not affect any [`Block`]s mapping it.
136136
///
@@ -182,7 +182,11 @@ pub trait Sender {
182182
/// by serializing them the content of messages
183183
///
184184
/// [`receive_message`]: Receiver::receive_message
185-
fn send_message(&mut self, handle: SharedMemoryHandle, range: Range<usize>) -> std::io::Result<()>;
185+
fn send_message(
186+
&mut self,
187+
handle: SharedMemoryHandle,
188+
range: Range<usize>,
189+
) -> std::io::Result<()>;
186190

187191
/// Ensure writes to a region of shared memory are visible to the counterpart.
188192
///
@@ -254,10 +258,7 @@ pub trait Receiver {
254258
/// Report an error encountered trying to receive a message.
255259
///
256260
/// After this call returns, this `Receiver` will be dropped.
257-
fn receive_error(
258-
&mut self,
259-
error: std::io::Error,
260-
) {
261+
fn receive_error(&mut self, error: std::io::Error) {
261262
let _ = error;
262263
}
263264
}

0 commit comments

Comments
 (0)