comparison rust/hg-cpython/src/filepatterns.rs @ 43772:ee3872c14ab3

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.
author Yuya Nishihara <yuya@tcha.org>
date Tue, 19 Nov 2019 23:19:57 +0900
parents f79377f24487
children ce088b38f92b
comparison
equal deleted inserted replaced
43771:f79377f24487 43772:ee3872c14ab3
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 }