Skip to content

Commit def08f3

Browse files
committed
Fixed crashed when no profile returned for player
1 parent abf6b13 commit def08f3

File tree

14 files changed

+31
-19
lines changed

14 files changed

+31
-19
lines changed

RELEASE.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# dcli Release Notes
22

3+
## v0.99.8 January 26, 2024
4+
5+
- Fixed crash when adding player with no player profiles.
6+
37
## v0.99.7 January 26, 2024
48

59
- Added support for Iron Banner Fortress (iron_banner_fortress)

src/Cargo.lock

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/dcli/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "dcli"
33
#version
4-
version = "0.99.7"
4+
version = "0.99.8"
55
authors = ["Mike Chambers <[email protected]>"]
66
edition = "2018"
77
description = "Library for the dcli collection of command line tools for Destiny 2."

src/dcli/src/apiinterface.rs

+4
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,10 @@ impl ApiInterface {
265265
//TODO: should we have an error here if no profiles are returned?
266266
//that should not happen
267267

268+
if linked_profiles.profiles.is_empty() {
269+
return Err(Error::NoProfilesFound);
270+
}
271+
268272
let mut most_recent: &DestinyProfileUserInfoCard =
269273
&linked_profiles.profiles[0];
270274

src/dcli/src/error.rs

+4
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ pub enum Error {
6666
ActivityNotFound,
6767
DateTimePeriodOrder,
6868
BungieNameNotFound,
69+
NoProfilesFound,
6970
InvalidArgument { description: String },
7071
}
7172

@@ -170,6 +171,9 @@ impl Display for Error {
170171
Error::BungieNameNotFound => {
171172
write!(f, "Bungie name not found.")
172173
},
174+
Error::NoProfilesFound => {
175+
write!(f, "No player profiles found.")
176+
},
173177
}
174178
}
175179
}

src/dclia/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "dclia"
33
#version
4-
version = "0.99.7"
4+
version = "0.99.8"
55
authors = ["Mike Chambers <[email protected]>"]
66
description = "Command line tool for retrieving information on current activity for specified player character."
77
homepage = "https://www.mikechambers.com"

src/dcliad/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "dcliad"
33
#version
4-
version = "0.99.7"
4+
version = "0.99.8"
55
authors = ["Mike Chambers <[email protected]>"]
66
edition = "2018"
77
description = "Command line tool for viewing Destiny 2 activity details."

src/dcliah/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "dcliah"
33
#version
4-
version = "0.99.7"
4+
version = "0.99.8"
55
authors = ["Mike Chambers <[email protected]>"]
66
edition = "2018"
77
description = "Command line tool for viewing Destiny 2 activity history."

src/dclif/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "dclif"
33
#version
4-
version = "0.99.7"
4+
version = "0.99.8"
55
authors = ["Mike Chambers <[email protected]>"]
66
edition = "2018"
77
description = "Command line tool for querying specific Destiny 2 pvp stats."

src/dclim/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "dclim"
33
#version
4-
version = "0.99.7"
4+
version = "0.99.8"
55
authors = ["Mike Chambers <[email protected]>"]
66
edition = "2018"
77
description = "Command line tool for managing and syncing the remote Destiny 2 API manifest database."

src/dclistat/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "dclistat"
33
#version
4-
version = "0.99.7"
4+
version = "0.99.8"
55
authors = ["Mike Chambers <[email protected]>"]
66
edition = "2018"
77
description = "Command line tool for querying specific Destiny 2 pvp stats."

src/dclisync/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "dclisync"
33
#version
4-
version = "0.99.7"
4+
version = "0.99.8"
55
authors = ["Mike Chambers <[email protected]>"]
66
edition = "2018"
77
description = "Command line tool for downloading and syncing Destiny 2 Crucible activity history."

src/dclitime/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "dclitime"
33
#version
4-
version = "0.99.7"
4+
version = "0.99.8"
55
authors = ["Mike Chambers <[email protected]>"]
66
edition = "2018"
77
description = "Command line tool for retrieving Destiny 2 related date / time stamps"

src/tell/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "tell"
33
#version
4-
version = "0.99.7"
4+
version = "0.99.8"
55
authors = ["Mike Chambers <[email protected]>"]
66
edition = "2018"
77
description = "Simple library for handling different levels of user output for command line apps."

0 commit comments

Comments
 (0)