Skip to content
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
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: dtolnay/rust-toolchain@1.84.1
with:
components: clippy
components: clippy, rustfmt

- name: Run Clippy
run: cargo clippy -- -D warnings --allow unused_variables
Expand Down
2 changes: 1 addition & 1 deletion ra-rpc/src/rocket_helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ impl<'r> FromRequest<'r> for RpcRequest<'r> {
}
}

impl<'s, 'r, S> PrpcHandler<'s, 'r, S> {
impl<S> PrpcHandler<'_, '_, S> {
pub async fn handle<Call: RpcCall<S>>(self) -> Custom<Vec<u8>> {
let json = self.request.json;
let result = handle_prpc_impl::<S, Call>(self).await;
Expand Down
2 changes: 1 addition & 1 deletion supervisor/src/supervisor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl Supervisor {
}
if self
.info(&id)
.map_or(false, |info| info.state.status.is_running())
.is_some_and(|info| info.state.status.is_running())
{
bail!("Process is already running");
}
Expand Down
4 changes: 2 additions & 2 deletions teepod/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl App {
.supervisor
.info(id)
.await?
.map_or(false, |info| info.state.status.is_running());
.is_some_and(|info| info.state.status.is_running());
self.set_started(id, true)?;
let vm_config = {
let mut state = self.lock();
Expand Down Expand Up @@ -170,7 +170,7 @@ impl App {

pub async fn remove_vm(&self, id: &str) -> Result<()> {
let info = self.supervisor.info(id).await?;
let is_running = info.as_ref().map_or(false, |i| i.state.status.is_running());
let is_running = info.as_ref().is_some_and(|i| i.state.status.is_running());
if is_running {
bail!("VM is running, stop it first");
}
Expand Down
2 changes: 1 addition & 1 deletion tproxy/src/proxy/io_bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct OneDirection<'a, R, W> {
next_step: NextStep,
}

impl<'a, R, W> OneDirection<'a, R, W>
impl<R, W> OneDirection<'_, R, W>
where
R: AsyncRead + Unpin,
W: AsyncWrite + Unpin,
Expand Down