This repository was archived by the owner on Feb 6, 2026. It is now read-only.
Do not allow panics in the dal by default (ENG-2411)#3463
Merged
si-bors-ng[bot] merged 1 commit intomainfrom Mar 25, 2024
Merged
Do not allow panics in the dal by default (ENG-2411)#3463si-bors-ng[bot] merged 1 commit intomainfrom
si-bors-ng[bot] merged 1 commit intomainfrom
Conversation
nickgerace
commented
Mar 21, 2024
Comment on lines
+3
to
+8
| #![warn( | ||
| clippy::panic, | ||
| clippy::panic_in_result_fn, | ||
| clippy::unwrap_in_result, | ||
| clippy::unwrap_used | ||
| )] |
Contributor
Author
There was a problem hiding this comment.
This is the primary addition of the PR.
01e84c0 to
1d4c5e2
Compare
Contributor
Author
|
bors merge |
si-bors-ng Bot
added a commit
that referenced
this pull request
Mar 25, 2024
3463: Do not allow panics in the dal by default (ENG-2411) r=nickgerace a=nickgerace ## Description This PR disallows panics in the `dal` by default. It fixes or permits existing panic locations along the way. <img src="https://media1.giphy.com/media/HUkOv6BNWc1HO/giphy.gif"/> Co-authored-by: Nick Gerace <nick@systeminit.com>
Contributor
Author
|
bors cancel |
Contributor
|
Canceled. |
nickgerace
commented
Mar 25, 2024
| let current_root_weight = self.get_node_weight(self.root_index).unwrap(); | ||
| let current_root_weight = self | ||
| .get_node_weight(self.root_index) | ||
| .expect("this should be impossible and this code should only be used for debugging"); |
Contributor
Author
There was a problem hiding this comment.
We allow expects in debug output functions. This is within a function to prints out a "dot" graph for local development only.
| let filename_no_extension = format!("{}-{}", Ulid::new().to_string(), suffix); | ||
|
|
||
| let home_str = std::env::var("HOME").unwrap(); | ||
| let home_str = std::env::var("HOME").expect("could not find home directory via env"); |
Contributor
Author
There was a problem hiding this comment.
We allow expects in debug output functions. This is within a function to prints out a "dot" graph for local development only.
This commit disallows panics in the dal by default. It fixes or permits existing panic locations along the way. Signed-off-by: Nick Gerace <nick@systeminit.com>
1d4c5e2 to
bae64c7
Compare
Contributor
Author
|
bors merge |
Contributor
|
Build succeeded: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR disallows panics in the
dalby default. It fixes or permits existing panic locations along the way.