# HG changeset patch # User Pierre-Yves David # Date 1606570190 -3600 # Node ID 40f79997e81f681611fce4fb379055e764c8a826 # Parent 064449f9fdc2900079ffa40131f2e7951acf7ffd rust: fix non-utf8 char in requirements.rs Apparently Phabricator detect `rust/hg-core/src/requirements.rs` file as non utf8 ‽, and mark it as binary. During application it ended up being non-utf8 and this made Rust (and as a result heptapod) very angry:: error: couldn't read hg-core/src/requirements.rs: stream did not contain valid UTF-8 --> hg-core/src/lib.rs:11:9 | 11 | pub mod requirements; | ^^^^^^^^^^^^ error: aborting due to previous error error: could not compile `hg-core`. The after "fixing", the file content has no character matching the following regexp: [^0-9-a-zA-Z /(|).,{}!\[\]:"&=>?_*-;<`'#] So we should be fine, unless Phabricator does something funny again. Differential Revision: https://phab.mercurial-scm.org/D9444 diff -r 064449f9fdc2 -r 40f79997e81f rust/hg-core/src/requirements.rs --- a/rust/hg-core/src/requirements.rs Sun Nov 29 19:17:35 2020 +0530 +++ b/rust/hg-core/src/requirements.rs Sat Nov 28 14:29:50 2020 +0100 @@ -7,7 +7,7 @@ Io(io::Error), /// The `requires` file is corrupted Corrupted, - /// The repository requires a feature that we don’t support + /// The repository requires a feature that we don't support Unsupported { feature: String, }, @@ -55,7 +55,7 @@ pub fn check(repo_root: &Path) -> Result<(), RequirementsError> { for feature in load(repo_root)? { if !SUPPORTED.contains(&&*feature) { - return Err(RequirementsError::Unsupported { feature }) + return Err(RequirementsError::Unsupported { feature }); } } Ok(())