rust/rhg/src/main.rs
changeset 48972 6b31c0676147
parent 48770 f19be290756a
child 48985 c75dae6e4ca7
equal deleted inserted replaced
48971:4057563ebc6b 48972:6b31c0676147
   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.