equal
deleted
inserted
replaced
641 /// future. |
641 /// future. |
642 const SUPPORTED_EXTENSIONS: &[&[u8]] = |
642 const SUPPORTED_EXTENSIONS: &[&[u8]] = |
643 &[b"blackbox", b"share", b"sparse", b"narrow", b"*"]; |
643 &[b"blackbox", b"share", b"sparse", b"narrow", b"*"]; |
644 |
644 |
645 fn check_extensions(config: &Config) -> Result<(), CommandError> { |
645 fn check_extensions(config: &Config) -> Result<(), CommandError> { |
|
646 if let Some(b"*") = config.get(b"rhg", b"ignored-extensions") { |
|
647 // All extensions are to be ignored, nothing to do here |
|
648 return Ok(()); |
|
649 } |
|
650 |
646 let enabled: HashSet<&[u8]> = config |
651 let enabled: HashSet<&[u8]> = config |
647 .get_section_keys(b"extensions") |
652 .get_section_keys(b"extensions") |
648 .into_iter() |
653 .into_iter() |
649 .map(|extension| { |
654 .map(|extension| { |
650 // Ignore extension suboptions. Only `required` exists for now. |
655 // Ignore extension suboptions. Only `required` exists for now. |