Skip to content

Commit 341962a

Browse files
committed
refactor(gctx): remove duplicate function
1 parent a390202 commit 341962a

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

src/cargo/util/context/de.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ impl<'de, 'gctx> de::MapAccess<'de> for ConfigMapAccess<'gctx> {
387387
.gctx
388388
.get_cv_with_env(&self.de.key)
389389
.ok()
390-
.and_then(|cv| cv.map(|cv| cv.get_definition().clone())),
390+
.and_then(|cv| cv.map(|cv| cv.definition().clone())),
391391
)
392392
});
393393
self.de.key.pop();

src/cargo/util/context/mod.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2165,16 +2165,6 @@ impl fmt::Debug for ConfigValue {
21652165
}
21662166

21672167
impl ConfigValue {
2168-
fn get_definition(&self) -> &Definition {
2169-
match self {
2170-
CV::Boolean(_, def)
2171-
| CV::Integer(_, def)
2172-
| CV::String(_, def)
2173-
| CV::List(_, def)
2174-
| CV::Table(_, def) => def,
2175-
}
2176-
}
2177-
21782168
fn from_toml(def: Definition, toml: toml::Value) -> CargoResult<ConfigValue> {
21792169
let mut error_path = Vec::new();
21802170
Self::from_toml_inner(def, toml, &mut error_path).with_context(|| {

0 commit comments

Comments
 (0)