Pin cc for MSRV 1.56.1#24
Draft
DanGould wants to merge 15 commits intoKixunil:masterfrom
Draft
Conversation
Owner
|
Oh, the CI is not working because there's just |
Contributor
Author
|
I think the issue is that |
Owner
|
You need to change the |
7a803cb to
4a3a5b1
Compare
'#'' is not in the set qchar indirectly defined in BIP 21, and therefore should be escaped. [BIP 21](https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki#abnf-grammar): > labelparam = "label=" *qchar > messageparam = "message=" *qchar > otherparam = qchar *qchar [ "=" *qchar ] ... > Here, "qchar" corresponds to valid characters of an RFC 3986 URI query > component, excluding the "=" and "&" characters, which this BIP takes > as separators. [RFC 3986 § 3.4](https://www.rfc-editor.org/rfc/rfc3986#section-3.4): > The query component is indicated by the first question mark ("?") > character and terminated by a number sign ("#") character or by the > end of the URI. [RFC 3986 Appendix A](https://www.rfc-editor.org/rfc/rfc3986#appendix-A): > pchar = unreserved / pct-encoded / sub-delims / ":" / "@" > query = *( pchar / "/" / "?" ) ... > pct-encoded = "%" HEXDIG HEXDIG > unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" ... > sub-delims = "!" / "$" / "&" / "'" / "(" / ")" > / "*" / "+" / "," / ";" / "="
Although behavior for when encountering RFC 3986 fragments in BIP 21 URIs is not specified, according to RFC 3986 it is unambiguously not query data and therefore should be excluded from BIP 21 query parameters.
Fix escaping of '#' in parameter values and handling of unescaped '#' in uri
fix: unicode on exactly index 7 should not panic
is_some_and is stable only in Rust 1.70.0 and greater.
map_or(false, |s| s.eq_ignore_ascii_case(SCHEME)):
- This method is used to handle the Option returned by get().
- If get() returns None (i.e., the string is too short), map_or()
returns false.
- If get() returns Some(s), it applies the closure
|s| s.eq_ignore_ascii_case(SCHEME).
- This closure checks if the substring s is equal to SCHEME,
ignoring ASCII case differences.
- If they are equal, it returns true; otherwise, it returns
false.
Replace is_some_and with map_or for MSRV
The error is only passed up via `source` when `std::error::Error` is available. When the feature is off, it's dead code.
The code isn't actually dead, and is used in the bytes() function, but the compiler's dead code analysis doesn't fully track usage through feature flags and doesn't count if the pattern isn't considered a read of the field.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pin dependencies for MSRV 1.56.1