From 249b01854b980a77bb2ab71e56edbd6aee2c770c Mon Sep 17 00:00:00 2001 From: Linus Oleander <220827+oleander@users.noreply.github.com> Date: Sat, 16 Nov 2024 08:36:51 +0100 Subject: [PATCH] --- .devcontainer/devcontainer.json | 8 ++++++++ rustfmt.toml | 2 +- src/install.rs | 2 +- src/model.rs | 2 +- src/uninstall.rs | 4 ++-- 5 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..f74f656 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,8 @@ +{ + "image": "mcr.microsoft.com/devcontainers/rust:latest-bullseye", + "tasks": { + "test": "cargo test", + "build": "cargo build", + "launch": "cargo fmt --check" + } +} \ No newline at end of file diff --git a/rustfmt.toml b/rustfmt.toml index d4b9dc6..1e4b06d 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -20,7 +20,7 @@ reorder_modules = false newline_style = "Auto" fn_call_width = 90 hard_tabs = false -version = "Two" +style_edition = "2021" max_width = 140 tab_spaces = 2 diff --git a/src/install.rs b/src/install.rs index c0fdfa0..77754d9 100644 --- a/src/install.rs +++ b/src/install.rs @@ -1,6 +1,6 @@ -use colored::Colorize; use anyhow::{bail, Result}; use ai::filesystem::Filesystem; +use colored::Colorize; use console::Emoji; const EMOJI: Emoji<'_, '_> = Emoji("🔗", ""); diff --git a/src/model.rs b/src/model.rs index f3bd183..2fcde06 100644 --- a/src/model.rs +++ b/src/model.rs @@ -1,6 +1,6 @@ use std::default::Default; -use std::str::FromStr; use std::fmt::{self, Display}; +use std::str::FromStr; use anyhow::{bail, Result}; use serde::{Deserialize, Serialize}; diff --git a/src/uninstall.rs b/src/uninstall.rs index 3b91c28..cf599b3 100644 --- a/src/uninstall.rs +++ b/src/uninstall.rs @@ -1,11 +1,11 @@ use std::path::{Path, PathBuf}; use std::{env, fs}; -use colored::Colorize; +use anyhow::{bail, Context, Result}; use ai::style::Styled; +use colored::Colorize; use console::Emoji; use git2::{Repository, RepositoryOpenFlags as Flags}; -use anyhow::{bail, Context, Result}; use thiserror::Error; #[derive(Error, Debug)]