mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Remove dead code
This commit is contained in:
parent
285fbdfe3b
commit
f214564552
@ -97,7 +97,7 @@ pub enum CompileMode {
|
|||||||
Doctest,
|
Doctest,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Deserialize)]
|
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||||
pub enum MessageFormat {
|
pub enum MessageFormat {
|
||||||
Human,
|
Human,
|
||||||
Json
|
Json
|
||||||
|
@ -4,9 +4,6 @@ use std::fs;
|
|||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
use serde::{Deserialize, Deserializer};
|
|
||||||
use serde::de;
|
|
||||||
|
|
||||||
use git2::Config as GitConfig;
|
use git2::Config as GitConfig;
|
||||||
use git2::Repository as GitRepository;
|
use git2::Repository as GitRepository;
|
||||||
|
|
||||||
@ -64,23 +61,6 @@ struct MkOptions<'a> {
|
|||||||
bin: bool,
|
bin: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'de> Deserialize<'de> for VersionControl {
|
|
||||||
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<VersionControl, D::Error> {
|
|
||||||
Ok(match &String::deserialize(d)?[..] {
|
|
||||||
"git" => VersionControl::Git,
|
|
||||||
"hg" => VersionControl::Hg,
|
|
||||||
"pijul" => VersionControl::Pijul,
|
|
||||||
"fossil" => VersionControl::Fossil,
|
|
||||||
"none" => VersionControl::NoVcs,
|
|
||||||
n => {
|
|
||||||
let value = de::Unexpected::Str(n);
|
|
||||||
let msg = "unsupported version control system";
|
|
||||||
return Err(de::Error::invalid_value(value, &msg));
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<'a> NewOptions<'a> {
|
impl<'a> NewOptions<'a> {
|
||||||
pub fn new(version_control: Option<VersionControl>,
|
pub fn new(version_control: Option<VersionControl>,
|
||||||
bin: bool,
|
bin: bool,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user