From 02b5649aa06e1f2ab91441d5206c31b6b3af46dc Mon Sep 17 00:00:00 2001 From: jdonszelmann Date: Fri, 24 May 2024 13:49:57 +0200 Subject: [PATCH] fmt&clippy --- scopegraphs/examples/records.rs | 9 +++------ scopegraphs/src/completeness/mod.rs | 6 +++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/scopegraphs/examples/records.rs b/scopegraphs/examples/records.rs index 39bb2f0..d420f9a 100644 --- a/scopegraphs/examples/records.rs +++ b/scopegraphs/examples/records.rs @@ -6,6 +6,7 @@ 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; @@ -13,8 +14,6 @@ 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 { @@ -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") } } } @@ -817,4 +814,4 @@ in a.b.a.x; println!("Type of example is: {:?}", typecheck(&example)); Ok(()) -} \ No newline at end of file +} diff --git a/scopegraphs/src/completeness/mod.rs b/scopegraphs/src/completeness/mod.rs index 8e43f75..0dbb3d6 100644 --- a/scopegraphs/src/completeness/mod.rs +++ b/scopegraphs/src/completeness/mod.rs @@ -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.