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

Method new

1603-design-parking-system.rs:7–12  ·  view source on GitHub ↗
(big: i32, medium: i32, small: i32)

Source from the content-addressed store, hash-verified

5
6impl ParkingSystem {
7 fn new(big: i32, medium: i32, small: i32) -> Self {
8 ParkingSystem {
9 max: vec!(big, medium, small),
10 current: vec![0; 3]
11 }
12 }
13
14 fn add_car(&mut self, car_type: i32) -> bool {
15 let car_type = car_type as usize - 1;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected