Rename get_cards->into_cardapps;
Fix get_card_app() [doesn't need &mut]
This commit is contained in:
parent
c872e46e80
commit
7a7db8a131
4 changed files with 5 additions and 5 deletions
|
@ -38,7 +38,7 @@ pub struct TestCardApp {
|
|||
}
|
||||
|
||||
impl TestCardApp {
|
||||
pub(crate) fn get_card_app(&mut self) -> Result<CardApp> {
|
||||
pub(crate) fn get_card_app(&self) -> Result<CardApp> {
|
||||
self.tc.open()
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ impl TestConfig {
|
|||
Ok(config)
|
||||
}
|
||||
|
||||
pub fn get_cards(self) -> Vec<TestCardApp> {
|
||||
pub fn into_cardapps(self) -> Vec<TestCardApp> {
|
||||
let mut cards = vec![];
|
||||
|
||||
for (name, card) in self.card {
|
||||
|
|
|
@ -15,7 +15,7 @@ fn main() -> Result<()> {
|
|||
|
||||
let config = TestConfig::load("config/test-cards.toml")?;
|
||||
|
||||
let cards = config.get_cards();
|
||||
let cards = config.into_cardapps();
|
||||
|
||||
for mut card in cards {
|
||||
println!("** Run tests on card '{}' **", card.get_name());
|
||||
|
|
|
@ -14,7 +14,7 @@ fn main() -> Result<()> {
|
|||
|
||||
let config = TestConfig::load("config/test-cards.toml")?;
|
||||
|
||||
let cards = config.get_cards();
|
||||
let cards = config.into_cardapps();
|
||||
|
||||
for mut card in cards {
|
||||
println!("** Run tests on card {} **", card.get_name());
|
||||
|
|
|
@ -11,7 +11,7 @@ fn main() -> Result<()> {
|
|||
|
||||
let config = TestConfig::load("config/test-cards.toml")?;
|
||||
|
||||
let cards = config.get_cards();
|
||||
let cards = config.into_cardapps();
|
||||
|
||||
for mut card in cards {
|
||||
println!("** Run tests on card '{}' **", card.get_name());
|
||||
|
|
Loading…
Reference in a new issue