···790790// Note we don't use http-serde since we also want to validate the scheme and host is set.
791791mod uri_serde {
792792 use http::uri::InvalidUri;
793793- use serde::{de::Error as _, Deserialize, Deserializer};
793793+ use serde::{Deserialize, Deserializer, de::Error as _};
794794795795 pub fn deserialize<'de, D>(deserializer: D) -> Result<http::Uri, D::Error>
796796 where
···824824// This prefixes https as a default in the event no scheme was provided
825825mod uri_serde_default_https {
826826 use http::uri::InvalidUri;
827827- use serde::{de::Error as _, Deserialize, Deserializer};
827827+ use serde::{Deserialize, Deserializer, de::Error as _};
828828829829 pub fn deserialize<'de, D>(deserializer: D) -> Result<http::Uri, D::Error>
830830 where
···11//! General functions for working with graphs.
2233-use petgraph::{prelude::NodeIndex, stable_graph::StableGraph, Direction};
33+use petgraph::{Direction, prelude::NodeIndex, stable_graph::StableGraph};
4455/// Sort a graph into a sequence from the leaves to the roots.
66///
···2020 pretty::*,
2121};
2222use camino::Utf8Path;
2323-use ecow::{eco_format, EcoString};
2323+use ecow::{EcoString, eco_format};
2424use expression::Context;
2525use itertools::Itertools;
2626···530530 // and the target support is not enforced. In this case we do not error, instead
531531 // returning nothing which will cause no function to be generated.
532532 Err(error) if error.is_unsupported() && !self.target_support.is_enforced() => {
533533- return None
533533+ return None;
534534 }
535535536536 // Some other error case which will be returned to the user.
···1212//! <https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html>
13131414use crate::ast::{AssignName, Publicity};
1515-use crate::type_::{is_prelude_module, PRELUDE_MODULE_NAME};
1515+use crate::type_::{PRELUDE_MODULE_NAME, is_prelude_module};
1616use crate::{
1717 ast::{
1818 CustomType, Definition, Function, Import, ModuleConstant, TypeAlias, TypedArg,
···2020 },
2121 docvec,
2222 javascript::JavaScriptCodegenTarget,
2323- pretty::{break_, Document, Documentable},
2323+ pretty::{Document, Documentable, break_},
2424 type_::{Type, TypeVar},
2525};
2626-use ecow::{eco_format, EcoString};
2626+use ecow::{EcoString, eco_format};
2727use itertools::Itertools;
2828use std::{collections::HashMap, ops::Deref, sync::Arc};
29293030-use super::{import::Imports, join, line, lines, wrap_args, Output, INDENT};
3030+use super::{INDENT, Output, import::Imports, join, line, lines, wrap_args};
31313232/// When rendering a type variable to an TypeScript type spec we need all type
3333/// variables with the same id to end up with the same name in the generated
···11use std::sync::{
22- atomic::{AtomicU64, Ordering},
32 Arc,
33+ atomic::{AtomicU64, Ordering},
44};
5566/// A generator of unique ids. Only one should be used per compilation run to
···1717use ecow::EcoString;
1818use std::{
1919 io::Write,
2020- sync::{atomic::Ordering, Arc},
2020+ sync::{Arc, atomic::Ordering},
2121};
2222use std::{rc::Rc, sync::atomic::AtomicUsize};
2323use termcolor::Buffer;
···10021002 panic_position: unreachable_code_kind,
10031003 } => {
10041004 let text = match unreachable_code_kind {
10051005- PanicPosition::PreviousExpression =>
10061006- "This code is unreachable because it comes after a `panic`.",
10071007- PanicPosition::PreviousFunctionArgument =>
10051005+ PanicPosition::PreviousExpression => {
10061006+ "This code is unreachable because it comes after a `panic`."
10071007+ }
10081008+ PanicPosition::PreviousFunctionArgument => {
10081009 "This argument is unreachable because the previous one always panics. \
10091009-Your code will crash before reaching this point.",
10101010- PanicPosition::LastFunctionArgument =>
10101010+Your code will crash before reaching this point."
10111011+ }
10121012+ PanicPosition::LastFunctionArgument => {
10111013 "This function call is unreachable because its last argument always panics. \
10121012-Your code will crash before reaching this point.",
10141014+Your code will crash before reaching this point."
10151015+ }
10131016 };
1014101710151018 Diagnostic {