Skip to content

Commit c17d9c4

Browse files
committed
tuftool: Work around dead code linting bug
Bug report: rust-lang/rust#64362 Signed-off-by: iliana destroyer of worlds <iweller@amazon.com>
1 parent fff4702 commit c17d9c4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tuftool/src/source.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ use std::path::PathBuf;
1515
use std::str::FromStr;
1616
use url::Url;
1717

18-
// Silence "variant is never constructed: `Ssm`"; there appears to be a bug in this linter?
19-
#[allow(dead_code)]
2018
#[derive(Debug)]
2119
pub(crate) enum KeySource {
2220
Local(PathBuf),
@@ -80,9 +78,9 @@ impl FromStr for KeySource {
8078
.context(error::UrlParse { url: s })?;
8179

8280
match url.scheme() {
83-
"file" => Ok(Self::Local(PathBuf::from(url.path()))),
81+
"file" => Ok(KeySource::Local(PathBuf::from(url.path()))),
8482
#[cfg(any(feature = "rusoto-native-tls", feature = "rusoto-rustls"))]
85-
"aws-ssm" => Ok(Self::Ssm {
83+
"aws-ssm" => Ok(KeySource::Ssm {
8684
profile: url.host_str().and_then(|s| {
8785
if s.is_empty() {
8886
None

0 commit comments

Comments
 (0)