Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bedroombuilds/python2rust
/ add
Method
add
0c_operator_overloading/rust/operator_overloading.rs:17–20 ·
view source on GitHub ↗
(self, rhs: String)
Source
from the content-addressed store, hash-verified
15
type Output = MyString;
16
17
fn add(self, rhs: String) -> Self::Output {
18
println!(
"> MyString.add({}) was called"
, &rhs);
19
MyString(format!(
"{}{}"
, self.0, rhs))
20
}
21
}
22
23
impl ops::Add<i32> for MyString {
Callers
nothing calls this directly
Calls
1
MyString
Class · 0.85
Tested by
no test coverage detected