Skip to content

Commit 97ce1da

Browse files
committed
Fix Option<String> repr
1 parent 295c754 commit 97ce1da

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ impl PythonBindGenerator {
10431043
self.file_contents.push(Cow::Borrowed(" .as_ref()"));
10441044
if Self::BASE_TYPES.into_iter().any(|t| variable_type.contains(t)) {
10451045
self.file_contents
1046-
.push(Cow::Borrowed(" .map(ToString::to_string)"));
1046+
.push(Cow::Borrowed(" .map(|i| format!(\"{i:?}\"))"));
10471047
} else {
10481048
self.file_contents
10491049
.push(Cow::Borrowed(" .map(|x| x.borrow(py).__repr__(py))"));

0 commit comments

Comments
 (0)