Skip to content

Commit 8059744

Browse files
committed
Improve doc
Signed-off-by: Moritz Hoffmann <[email protected]>
1 parent 0e1049b commit 8059744

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

container/src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,11 @@ pub trait ContainerBuilder: Default + 'static {
126126
container.clear();
127127
}
128128

129-
/// Indicates a good moment to release resources. By default, does nothing. Callers should
130-
/// not rely on this method releasing any internal state though, i.e., the caller first
131-
/// needs to drain the contents using [`Self::finish`].
129+
/// Indicates a good moment to release resources.
130+
///
131+
/// By default, does nothing. Callers first needs to drain the contents using [`Self::finish`]
132+
/// before calling this function. The implementation should not change the contents of the
133+
/// builder.
132134
#[inline]
133135
fn relax(&mut self) { }
134136
}

timely/examples/columnar.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,8 @@ mod builder {
335335

336336
#[inline]
337337
fn relax(&mut self) {
338-
/// The caller is responsible for draining all contents; assert that we are empty.
339-
/// The assertion is not strictly necessary, but it helps catch bugs.
338+
// The caller is responsible for draining all contents; assert that we are empty.
339+
// The assertion is not strictly necessary, but it helps catch bugs.
340340
assert!(self.current.is_empty());
341341
assert!(self.pending.is_empty());
342342
*self = Self::default();

0 commit comments

Comments
 (0)