Skip to content

Commit

Permalink
Remove local-encoding as a test dependency
Browse files Browse the repository at this point in the history
Summary:
Implementation usage of local-encoding was removed in D9447823, and we discussed removing the crate then. This is a very old, unmaintained crate and sapling is the only remaining user of it.

Remove local-encoding as a test dependency.

Reviewed By: zzl0

Differential Revision: D67541691

fbshipit-source-id: 9df3ac57947ec405a6998f55a16a35b52015751d
  • Loading branch information
Wilfred authored and facebook-github-bot committed Jan 3, 2025
1 parent b42a00c commit 716173f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
3 changes: 0 additions & 3 deletions eden/scm/lib/encoding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ sapling-types = { version = "0.1.0", path = "../types" }
[target.'cfg(target_os = "windows")'.dependencies]
winapi = { version = "0.3", features = ["everything", "std"] }

[target.'cfg(target_os = "windows")'.dev-dependencies]
local-encoding = "0.2"

[target.'cfg(windows)'.dependencies]
local-encoding = "*"
winapi = "0.3"
10 changes: 0 additions & 10 deletions eden/scm/lib/encoding/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,6 @@ mod tests {
fn test_utf8_roundtrip() {
let bytes = b"\xE7\xAE\xA1\xE7\x90\x86\xE5\x91\x98\x2F\xE6\xA1\x8C\xE9\x9D\xA2";

#[cfg(windows)]
let bytes = {
use local_encoding::Encoder;
use local_encoding::Encoding;
match Encoding::ANSI.to_bytes(::std::str::from_utf8(bytes).expect("from_utf8")) {
Ok(s) => s,
_ => return, // Cannot be encoded using local encoding. Skip the test.
}
};

check_roundtrip(&bytes[..]).expect("roundtrip");
}

Expand Down

0 comments on commit 716173f

Please sign in to comment.