mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-28 15:56:28 +00:00
chore: fix new clippy lints (#4136)
This commit is contained in:
parent
7594f01d3d
commit
eb67534ac9
@ -99,7 +99,7 @@ pub const PROMPT_ORDER: &[&str] = &[
|
|||||||
];
|
];
|
||||||
|
|
||||||
// On changes please also update `Default` for the `FullConfig` struct in `mod.rs`
|
// On changes please also update `Default` for the `FullConfig` struct in `mod.rs`
|
||||||
impl<'a> Default for StarshipRootConfig {
|
impl Default for StarshipRootConfig {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
schema: "https://starship.rs/config-schema.json".to_string(),
|
schema: "https://starship.rs/config-schema.json".to_string(),
|
||||||
|
@ -573,7 +573,7 @@ fn get_remote_repository_info(repository: &Repository) -> Option<Remote> {
|
|||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
pub enum Shell {
|
pub enum Shell {
|
||||||
Bash,
|
Bash,
|
||||||
Fish,
|
Fish,
|
||||||
@ -589,7 +589,7 @@ pub enum Shell {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Which kind of prompt target to print (main prompt, rprompt, ...)
|
/// Which kind of prompt target to print (main prompt, rprompt, ...)
|
||||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
pub enum Target {
|
pub enum Target {
|
||||||
Main,
|
Main,
|
||||||
Right,
|
Right,
|
||||||
|
@ -32,7 +32,7 @@ type VariableMapType<'a> =
|
|||||||
type StyleVariableMapType<'a> =
|
type StyleVariableMapType<'a> =
|
||||||
BTreeMap<String, Option<Result<Cow<'a, str>, StringFormatterError>>>;
|
BTreeMap<String, Option<Result<Cow<'a, str>, StringFormatterError>>>;
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||||
pub enum StringFormatterError {
|
pub enum StringFormatterError {
|
||||||
Custom(String),
|
Custom(String),
|
||||||
Parse(PestError<Rule>),
|
Parse(PestError<Rule>),
|
||||||
|
@ -58,7 +58,6 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
|||||||
|
|
||||||
fn parse_v_version(v_version: &str) -> Option<String> {
|
fn parse_v_version(v_version: &str) -> Option<String> {
|
||||||
let version = v_version
|
let version = v_version
|
||||||
.trim()
|
|
||||||
// split into ["V", "0.2", "30c0659"]
|
// split into ["V", "0.2", "30c0659"]
|
||||||
.split_whitespace()
|
.split_whitespace()
|
||||||
// return "0.2"
|
// return "0.2"
|
||||||
|
Loading…
Reference in New Issue
Block a user