Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add #[must_use] to All Custom Futures #104

Merged
merged 1 commit into from
Dec 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/emulator/gba/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ impl Emulator {
}

/// A future that executes a future until the emulator closes.
#[must_use = "You need to await this future."]
pub struct UntilEmulatorCloses<'a, F> {
emulator: &'a Emulator,
future: F,
Expand Down
1 change: 1 addition & 0 deletions src/emulator/gcn/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ impl Emulator {
}

/// A future that executes a future until the emulator closes.
#[must_use = "You need to await this future."]
pub struct UntilEmulatorCloses<'a, F> {
emulator: &'a Emulator,
future: F,
Expand Down
1 change: 1 addition & 0 deletions src/emulator/genesis/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ impl Emulator {
}

/// A future that executes a future until the emulator closes.
#[must_use = "You need to await this future."]
pub struct UntilEmulatorCloses<'a, F> {
emulator: &'a Emulator,
future: F,
Expand Down
1 change: 1 addition & 0 deletions src/emulator/ps1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ impl Emulator {
}

/// A future that executes a future until the emulator closes.
#[must_use = "You need to await this future."]
pub struct UntilEmulatorCloses<'a, F> {
emulator: &'a Emulator,
future: F,
Expand Down
1 change: 1 addition & 0 deletions src/emulator/ps2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ impl Emulator {
}

/// A future that executes a future until the emulator closes.
#[must_use = "You need to await this future."]
pub struct UntilEmulatorCloses<'a, F> {
emulator: &'a Emulator,
future: F,
Expand Down
1 change: 1 addition & 0 deletions src/emulator/sms/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ impl Emulator {
}

/// A future that executes a future until the emulator closes.
#[must_use = "You need to await this future."]
pub struct UntilEmulatorCloses<'a, F> {
emulator: &'a Emulator,
future: F,
Expand Down
1 change: 1 addition & 0 deletions src/emulator/wii/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ impl Emulator {
}

/// A future that executes a future until the emulator closes.
#[must_use = "You need to await this future."]
pub struct UntilEmulatorCloses<'a, F> {
emulator: &'a Emulator,
future: F,
Expand Down
1 change: 1 addition & 0 deletions src/future/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ impl<const N: usize> Signature<N> {
}

/// A future that executes a future until the process closes.
#[must_use = "You need to await this future."]
pub struct UntilProcessCloses<'a, F> {
process: &'a Process,
future: F,
Expand Down
1 change: 1 addition & 0 deletions src/future/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ pub fn sleep(duration: Duration) -> Sleep {
/// // the future timed out
/// }
/// ```
#[must_use = "You need to await this future."]
pub struct Timeout<F> {
sleep: Sleep,
future: F,
Expand Down
Loading