support auth in non-HTTPie session files
@@ -18,6 +18,7 @@ use crate::utils::test_mode;
enum Meta {
Xh { about: String, xh: String },
Httpie { httpie: String },
+ Other,
}
impl Default for Meta {
@@ -59,8 +60,6 @@ struct Content {
impl Content {
fn migrate(mut self) -> Self {
- match self.meta {
- Meta::Httpie { .. } => {
let auth = mem::take(&mut self.auth);
if let Some(Auth {
auth_type: Some(ref auth_type),
@@ -73,9 +72,6 @@ impl Content {
.or_insert_with(|| format!("Basic {}", base64::encode(raw_auth)));
}
}
- }
- Meta::Xh { .. } => {}
- }
self.meta = Meta::default();
self
}
