Skip to content

Commit 06e17af

Browse files
Merge pull request RustPython#607 from adrian17/strings
Convert a bunch of string methods to new-args-style.
2 parents 6f61e58 + e4e8b13 commit 06e17af

File tree

2 files changed

+326
-476
lines changed

2 files changed

+326
-476
lines changed

vm/src/function.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use std::fmt;
12
use std::marker::PhantomData;
23
use std::ops::Deref;
34

@@ -81,3 +82,9 @@ impl<T> IntoPyObject for PyRef<T> {
8182
Ok(self.obj)
8283
}
8384
}
85+
86+
impl<T> fmt::Display for PyRef<T> {
87+
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
88+
self.obj.fmt(f)
89+
}
90+
}

0 commit comments

Comments
 (0)