MCPcopy Create free account
hub / github.com/StudyRust/leetcode_rust / new

Method new

2043-simple-bank-system.rs:11–15  ·  view source on GitHub ↗
(balance: Vec<i64>)

Source from the content-addressed store, hash-verified

9
10impl Bank {
11 fn new(balance: Vec<i64>) -> Self {
12 Bank {
13 balance: balance
14 }
15 }
16
17 fn transfer(&mut self, account1: i32, account2: i32, money: i64) -> bool {
18 if self.balance.get(account1 as usize - 1) == None {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected