-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shows e-exprs inside container literals, delimited END #186
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6d97c05
Shows e-exprs inside container literals, delimited END
zslayton 5d264bf
Clippy suggestions
zslayton 2f5e7c4
removes unused comment
zslayton f6853a5
Improves rendering of eexps, arg groups, comments
zslayton 859e6c9
Upgrade ion-rs to rc.11
zslayton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,7 +105,7 @@ impl<'a> CodeGenerator<'a, JavaLanguage> { | |
} | ||
} | ||
|
||
impl<'a, L: Language + 'static> CodeGenerator<'a, L> { | ||
impl<L: Language + 'static> CodeGenerator<'_, L> { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🪧 Clippy suggestion. |
||
/// A [tera] filter that converts given tera string value to [upper camel case]. | ||
/// Returns error if the given value is not a string. | ||
/// | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ use ion_rs::ion_hash::IonHasher; | |
use ion_rs::*; | ||
use sha2::{Sha256, Sha512}; | ||
use sha3::{Sha3_256, Sha3_512}; | ||
use std::fmt; | ||
use std::io::Write; | ||
|
||
// Macro to eliminate repetitive code for each hash algorithm. | ||
|
@@ -109,8 +110,14 @@ impl IonCliCommand for HashCommand { | |
for elem in reader.elements() { | ||
let elem = elem?; | ||
let digest = hasher.hash_it(&elem)?; | ||
let digest_string: String = | ||
digest.iter().map(|b| format!("{:02x?}", b)).collect(); | ||
let digest_string = digest.iter().fold( | ||
String::with_capacity(digest.len() * 2), | ||
|mut string, byte| { | ||
use fmt::Write; | ||
write!(&mut string, "{:02x}", byte).expect("infallible"); | ||
string | ||
}, | ||
); | ||
Comment on lines
-112
to
+120
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🪧 Clippy suggestion. |
||
output.write_all(digest_string.as_bytes())?; | ||
output.write_all("\n".as_bytes())?; | ||
} | ||
|
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🪧 This file is auto-generated and does not require review.