Merge pull request #3498 from mejrs/b

Pin byteorder on msrv
This commit is contained in:
Bruno Kolenbrander 2023-10-08 02:47:23 +00:00 committed by GitHub
commit 5b5eb1983c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -493,6 +493,7 @@ def set_minimal_package_versions(session: nox.Session):
"regex": "1.7.3",
"proptest": "1.0.0",
"chrono": "0.4.25",
"byteorder": "1.4.3",
}
# run cargo update first to ensure that everything is at highest

View File

@ -79,12 +79,13 @@ pub enum ElementType {
impl ElementType {
/// Determines the `ElementType` from a Python `struct` module format string.
///
/// See <https://docs.python.org/3/library/struct.html#format-strings> for more information
/// about struct format strings.
pub fn from_format(format: &CStr) -> ElementType {
match format.to_bytes() {
[char] | [b'@', char] => native_element_type_from_type_char(*char),
[modifier, char] if matches!(modifier, b'=' | b'<' | b'>' | b'!') => {
standard_element_type_from_type_char(*char)
}
[size] | [b'@', size] => native_element_type_from_type_char(*size),
[b'=' | b'<' | b'>' | b'!', size] => standard_element_type_from_type_char(*size),
_ => ElementType::Unknown,
}
}

View File

@ -33,7 +33,7 @@ fn test_compile_errors() {
t.compile_fail("tests/ui/invalid_pymethod_receiver.rs");
t.compile_fail("tests/ui/missing_intopy.rs");
// adding extra error conversion impls changes the output
#[cfg(not(any(feature = "eyre", feature = "anyhow")))]
#[cfg(all(target_os = "linux", not(any(feature = "eyre", feature = "anyhow"))))]
t.compile_fail("tests/ui/invalid_result_conversion.rs");
t.compile_fail("tests/ui/not_send.rs");
t.compile_fail("tests/ui/not_send2.rs");