Skip to content

Commit

Permalink
Auto merge of #125443 - nnethercote:rustfmt-use-decls, r=lcnr,cuviper…
Browse files Browse the repository at this point in the history
…,GuillaumeGomez

rustfmt `use` declarations

This PR implements rust-lang/compiler-team#750, which changes how `use` declarations are formatted by adding these options to `rustfmt.toml`:
```
group_imports = "StdExternalCrate"
imports_granularity = "Module"
```

r? `@ghost`
  • Loading branch information
bors committed Jul 29, 2024
2 parents fa7ed8a + 4581e7c commit 3238acc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,12 @@
#![feature(rustdoc_internals)]
// tidy-alphabetical-end

use LabelText::*;

use std::borrow::Cow;
use std::io;
use std::io::prelude::*;

use LabelText::*;

/// The text for a graphviz label on a node or edge.
pub enum LabelText<'a> {
/// This kind of label preserves the text directly as is.
Expand Down
6 changes: 4 additions & 2 deletions src/tests.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
use super::LabelText::{self, EscStr, HtmlStr, LabelStr};
use super::{render, Edges, GraphWalk, Id, Labeller, Nodes, Style};
use std::io;
use std::io::prelude::*;

use NodeLabels::*;

use super::LabelText::{self, EscStr, HtmlStr, LabelStr};
use super::{render, Edges, GraphWalk, Id, Labeller, Nodes, Style};

/// each node is an index in a vector in the graph.
type Node = usize;
struct Edge {
Expand Down

0 comments on commit 3238acc

Please sign in to comment.