Skip to content

Pin cc for MSRV 1.56.1#24

Draft
DanGould wants to merge 15 commits intoKixunil:masterfrom
DanGould:pin-1-56
Draft

Pin cc for MSRV 1.56.1#24
DanGould wants to merge 15 commits intoKixunil:masterfrom
DanGould:pin-1-56

Conversation

@DanGould
Copy link
Copy Markdown
Contributor

@DanGould DanGould commented Aug 1, 2024

Pin dependencies for MSRV 1.56.1

@Kixunil
Copy link
Copy Markdown
Owner

Kixunil commented Aug 2, 2024

Oh, the CI is not working because there's just on: push, not on: pull-request. It should start working when you change it.

@DanGould
Copy link
Copy Markdown
Contributor Author

DanGould commented Aug 2, 2024

I think the issue is that on: push detects pushses to this repo. When I open a pull request I'm pushing to a branch on my own repo.

@Kixunil
Copy link
Copy Markdown
Owner

Kixunil commented Aug 2, 2024

You need to change the on field at the top of the yml file.

@DanGould DanGould force-pushed the pin-1-56 branch 5 times, most recently from 7a803cb to 4a3a5b1 Compare December 2, 2024 16:14
nothingmuch and others added 4 commits December 2, 2024 17:38
'#'' 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants