Mercurial > public > mercurial-scm > hg-stable
comparison rust/hg-cpython/src/filepatterns.rs @ 43467:b06cf2809ec3 stable
rust-cpython: do not convert warning pattern to utf-8 bytes
On Unix, both Rust Path and Mercurial expect a locale-dependent bytes,
and we don't support Windows yet.
Differential Revision: https://phab.mercurial-scm.org/D7614
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 19 Nov 2019 23:19:57 +0900 |
parents | 4f1cddd1939e |
children | ce088b38f92b |
comparison
equal
deleted
inserted
replaced
43466:4f1cddd1939e | 43467:b06cf2809ec3 |
---|---|
66 ) -> Vec<(PyBytes, PyBytes)> { | 66 ) -> Vec<(PyBytes, PyBytes)> { |
67 warnings | 67 warnings |
68 .iter() | 68 .iter() |
69 .map(|(path, syn)| { | 69 .map(|(path, syn)| { |
70 ( | 70 ( |
71 PyBytes::new(py, &path.to_string_lossy().as_bytes()), | 71 PyBytes::new(py, &files::get_bytes_from_path(path)), |
72 PyBytes::new(py, syn), | 72 PyBytes::new(py, syn), |
73 ) | 73 ) |
74 }) | 74 }) |
75 .collect() | 75 .collect() |
76 } | 76 } |