Update the crates and rust version #36
Open
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.
This pull request introduces several updates to the
radiocrate, focusing on enhancing maintainability, feature support, and compatibility with newer Rust standards. Key changes include updates to theCargo.tomlfile to modernize dependencies and features, the addition of new functionality for testing feature combinations, and various code improvements across multiple files.Dependency and Feature Updates:
Cargo.tomlfrom 2018 to 2024 and added new features (log,clap) to the feature set. Dependencies were also updated to their latest versions, improving compatibility and security. (Cargo.toml, Cargo.tomlL4-R53). Thelogandclapfeatures were referenced in thecfgdirectives, but not defined in theCargo.toml.New Testing Functionality:
checkscript in thejustfileto test all feature combinations inCargo.tomlusingtqandjq. This ensures the crate builds correctly under different feature sets. (justfile, justfileR1-R25). This is not the most eloquent solution, but it's a solution nonetheless.Logging Enhancements:
logcrate when thedefmtfeature is not enabled, providing more flexibility in debugging. (src/blocking.rs, [1];src/helpers.rs, [2]. This was mostly implemented, but there were cases where thecfgdirectives ondebug!calls specifiedany(feature = "defmt", feature = "log"), butlog::debugwas not imported.Code Modernization and Refactoring:
src/helpers.rs, src/helpers.rsL25-R33)expecttoupdate_expectationsin the mock module. (src/mock.rs, src/mock.rsL55-R54). This matches the updated method in theembedded-halcrate.New Functionality:
delay_usmethod in the mock module to simulate delays, enhancing the testing capabilities for timing-sensitive operations. (src/mock.rs, src/mock.rsR224-R232). The alternative was to change the test logic, but I opted for this approach (more methods = more functionality).