Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/StudyRust/leetcode_rust
/ main
Function
main
2043-simple-bank-system.rs:52–58 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
50
}
51
52
fn main() {
53
let mut bank = Bank::new(vec![10, 100, 20, 50, 30]);
54
bank.transfer(1, 2, 10);
55
bank.deposit(1, 30);
56
bank.withdraw(1, 10);
57
println!(
"{:?}"
, bank.balance.get(0));
58
}
Callers
nothing calls this directly
Calls
3
transfer
Method · 0.80
deposit
Method · 0.80
withdraw
Method · 0.80
Tested by
no test coverage detected