1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-06-09 02:56:15 +02:00

Format imports with imports_granularity = "Module".

This commit is contained in:
Andrew Walbran 2023-03-16 15:48:39 +00:00
parent 94eafee6bb
commit ecbb7e41bb
6 changed files with 13 additions and 19 deletions

View File

@ -33,8 +33,7 @@ use mdbook::BookItem;
use polib::catalog::Catalog; use polib::catalog::Catalog;
use polib::po_file; use polib::po_file;
use semver::{Version, VersionReq}; use semver::{Version, VersionReq};
use std::io; use std::{io, process};
use std::process;
use toml::Value; use toml::Value;
fn translate(text: &str, catalog: &Catalog) -> String { fn translate(text: &str, catalog: &Catalog) -> String {

View File

@ -26,8 +26,7 @@ use mdbook::renderer::RenderContext;
use mdbook::BookItem; use mdbook::BookItem;
use polib::catalog::Catalog; use polib::catalog::Catalog;
use polib::message::Message; use polib::message::Message;
use std::fs; use std::{fs, io};
use std::io;
fn add_message(catalog: &mut Catalog, msgid: &str, source: &str) { fn add_message(catalog: &mut Catalog, msgid: &str, source: &str) {
let sources = match catalog.find_message(msgid) { let sources = match catalog.find_message(msgid) {

View File

@ -19,7 +19,8 @@
extern crate panic_halt as _; extern crate panic_halt as _;
use cortex_m_rt::entry; use cortex_m_rt::entry;
use microbit::{hal::prelude::*, Board}; use microbit::hal::prelude::*;
use microbit::Board;
#[entry] #[entry]
fn main() -> ! { fn main() -> ! {

View File

@ -19,11 +19,9 @@
extern crate panic_halt as _; extern crate panic_halt as _;
use cortex_m_rt::entry; use cortex_m_rt::entry;
use nrf52833_hal::{ use nrf52833_hal::gpio::{p0, Level};
gpio::{p0, Level}, use nrf52833_hal::pac::Peripherals;
pac::Peripherals, use nrf52833_hal::prelude::*;
prelude::*,
};
#[entry] #[entry]
fn main() -> ! { fn main() -> ! {

View File

@ -18,14 +18,12 @@
extern crate panic_halt as _; extern crate panic_halt as _;
use cortex_m_rt::entry; use cortex_m_rt::entry;
use nrf52833_hal::{ use nrf52833_hal::gpio::p0::{self, P0_01, P0_02, P0_03};
gpio::{ use nrf52833_hal::gpio::{
p0::{self, P0_01, P0_02, P0_03}, Disconnected, Floating, Input, Level, OpenDrain, OpenDrainConfig, Output, PushPull,
Disconnected, Floating, Input, Level, OpenDrain, OpenDrainConfig, Output, PushPull,
},
pac::Peripherals,
prelude::*,
}; };
use nrf52833_hal::pac::Peripherals;
use nrf52833_hal::prelude::*;
// ANCHOR: Example // ANCHOR: Example
#[entry] #[entry]

View File

@ -13,8 +13,7 @@
// limitations under the License. // limitations under the License.
// ANCHOR: Philosopher // ANCHOR: Philosopher
use std::sync::mpsc; use std::sync::{mpsc, Arc, Mutex};
use std::sync::{Arc, Mutex};
use std::thread; use std::thread;
use std::time::Duration; use std::time::Duration;