mirror of
https://github.com/facebook/sapling.git
synced 2024-12-28 23:54:12 +03:00
py3/rust: types: add AsRef<str> for RepoPath
Summary: In a future diff, I have RepoPath in Rust and want to send unicode path to Python. Reviewed By: sfilipco Differential Revision: D19581184 fbshipit-source-id: 73a03707a6bdae4a497a8ee2c14314aa4ffefb6d
This commit is contained in:
parent
41cd693b98
commit
789d2b5fbb
@ -228,6 +228,12 @@ impl AsRef<RepoPath> for RepoPathBuf {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl AsRef<str> for RepoPathBuf {
|
||||||
|
fn as_ref(&self) -> &str {
|
||||||
|
&self.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl AsRef<[u8]> for RepoPathBuf {
|
impl AsRef<[u8]> for RepoPathBuf {
|
||||||
fn as_ref(&self) -> &[u8] {
|
fn as_ref(&self) -> &[u8] {
|
||||||
self.as_byte_slice()
|
self.as_byte_slice()
|
||||||
@ -359,6 +365,12 @@ impl AsRef<RepoPath> for RepoPath {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl AsRef<str> for RepoPath {
|
||||||
|
fn as_ref(&self) -> &str {
|
||||||
|
&self.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl AsRef<[u8]> for RepoPath {
|
impl AsRef<[u8]> for RepoPath {
|
||||||
fn as_ref(&self) -> &[u8] {
|
fn as_ref(&self) -> &[u8] {
|
||||||
self.as_byte_slice()
|
self.as_byte_slice()
|
||||||
|
Loading…
Reference in New Issue
Block a user