Skip to content

Commit

Permalink
fmt&clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
jdonszelmann committed May 24, 2024
1 parent c5e3ae9 commit 02b5649
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
9 changes: 3 additions & 6 deletions scopegraphs/examples/records.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ use scopegraphs::completeness::FutureCompleteness;
use scopegraphs::RenderScopeData;
use scopegraphs::{Scope, ScopeGraph, Storage};
use scopegraphs_macros::Label;
use smol::channel::{bounded, Sender};
use smol::LocalExecutor;
use std::cell::RefCell;
use std::error::Error;
use std::fmt::{Debug, Formatter};
use std::fs::File;
use std::future::Future;
use std::rc::Rc;
use smol::channel::{bounded, Sender};


#[derive(Debug, Label, Copy, Clone, Hash, PartialEq, Eq)]
enum SgLabel {
Expand Down Expand Up @@ -220,9 +219,7 @@ impl UnionFind {
let (tx, rx) = bounded(1);
callbacks[tv.0].push(tx);

async move {
rx.recv().await.expect("sender dropped")
}
async move { rx.recv().await.expect("sender dropped") }
}
}

Expand Down Expand Up @@ -817,4 +814,4 @@ in a.b.a.x;
println!("Type of example is: {:?}", typecheck(&example));

Ok(())
}
}
6 changes: 3 additions & 3 deletions scopegraphs/src/completeness/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
//!
//! Currently, the module contains three safe implementations.
//! * [`ImplicitClose`] is the easiest to use, and most likely the preferred choice for simple
//! sequential type checkers.
//! sequential type checkers.
//! * [`ExplicitClose`] requires some manual bookkeeping, but allows more flexible handling of
//! queries. This is the most suitable choice for type checkers that need to do dynamic scheduling.
//! Running queries can return an error, because scopes relevant to the query weren't closed yet.
//! queries. This is the most suitable choice for type checkers that need to do dynamic scheduling.
//! Running queries can return an error, because scopes relevant to the query weren't closed yet.
//! * [`FutureCompleteness`] is like [`ExplicitClose`], except queries can no longer error. Instead,
//! queries return a [`Future`](std::future::Future) that resolves when all scopes related to the query are closed.
Expand Down

0 comments on commit 02b5649

Please sign in to comment.