Skip to content

Commit 1b29c34

Browse files
authored
Merge pull request #207 from LedgerHQ/y333_241024/nbgl_api_update
use mut ref when setting start page for HomeAndSettings
2 parents 4a0f8f2 + fac1af1 commit 1b29c34

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ledger_device_sdk/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ledger_device_sdk"
3-
version = "1.17.5"
3+
version = "1.18.0"
44
authors = ["yhql", "yogh333", "agrojean-ledger", "kingofpayne"]
55
edition = "2021"
66
license.workspace = true

ledger_device_sdk/src/nbgl/nbgl_home_and_settings.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub enum PageIndex {
4444
}
4545

4646
/// Used to display the home screen of the application, with an optional glyph,
47-
/// information fields, and settings switches.
47+
/// information fields, and settings switches.
4848
pub struct NbglHomeAndSettings {
4949
app_name: CString,
5050
info_contents: Vec<CString>,
@@ -134,11 +134,8 @@ impl<'a> NbglHomeAndSettings {
134134
}
135135
}
136136

137-
pub fn set_start_page(self, page: PageIndex) -> NbglHomeAndSettings {
138-
NbglHomeAndSettings {
139-
start_page: page,
140-
..self
141-
}
137+
pub fn set_start_page(&mut self, page: PageIndex) {
138+
self.start_page = page;
142139
}
143140

144141
/// Show the home screen and settings page.

0 commit comments

Comments
 (0)