Updated the Rust version used by the CI/CD and silenced clippy's missing_errors_doc lint
Check, format and test / build (push) Successful in 1m13s

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-10-01 12:44:07 +02:00
co-authored by Claude Sonnet 5
parent 07ef2a96bc
commit 93f9e9d3af
4 changed files with 16 additions and 8 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ on:
jobs: jobs:
build: build:
container: docker.io/rust:1.79.0-alpine3.20 container: docker.io/rust:1.98.1-alpine3.24
steps: steps:
- name: Install the dependencies - name: Install the dependencies
run: | run: |
+1 -1
View File
@@ -3,7 +3,7 @@
# R701 🕰️ # R701 🕰️
[![Rust](https://img.shields.io/badge/Rust-f74c00?logo=rust)](https://www.rust-lang.org) [![Rust](https://img.shields.io/badge/Rust-f74c00?logo=rust)](https://www.rust-lang.org)
[![Brain made](https://img.shields.io/badge/Brainmade-grey?logo=data:image/svg%2bxml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgd2lkdGg9IjY2LjUzOCIKICAgaGVpZ2h0PSI3OC43ODIiCiAgIGZpbGw9Im5vbmUiCiAgIHZlcnNpb249IjEuMSIKICAgaWQ9InN2ZzMiCiAgIHNvZGlwb2RpOmRvY25hbWU9IndoaXRlLWxvZ28taGVhZDMuc3ZnIgogICBpbmtzY2FwZTp2ZXJzaW9uPSIxLjMuMiAoMDkxZTIwZWYwZiwgMjAyMy0xMS0yNSwgY3VzdG9tKSIKICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiCiAgIHhtbG5zOnNvZGlwb2RpPSJodHRwOi8vc29kaXBvZGkuc291cmNlZm9yZ2UubmV0L0RURC9zb2RpcG9kaS0wLmR0ZCIKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB4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AxOC41NTQgMTUuMDIgMTguNTY4LjIzNiAwIC40OTItLjAyOC43MzgtLjA0djEyLjIxM1ptMi44MzktMzIuMTQzYTEwLjY0NiAxMC42NDYgMCAwIDEgOC4xMjQtMy4xMDZjLjM1IDYuMzQtNC44ODggMTEuNTc3LTExLjIyOCAxMS4yM2ExMC41OCAxMC41OCAwIDAgMSAzLjEwNC04LjEyNHpNMjcuNDAzIDM4LjE5M2ExMC42MDcgMTAuNjA3IDAgMCAxLTMuMTE4LTguMTIzYzYuMzQ0LS4zNTggMTEuNTg3IDQuODg2IDExLjIyOCAxMS4yMy0zLjAyMy4xNjktNS45NzMtLjk2MS04LjExLTMuMTA3eiIKICAgICAgIHN0eWxlPSJmaWxsOiNmZmZmZmYiCiAgICAgICBpZD0icGF0aDIiIC8+CiAgPC9nPgogIDxkZWZzCiAgICAgaWQ9ImRlZnMzIj4KICAgIDxjbGlwUGF0aAogICAgICAgaWQ9ImEiPgogICAgICA8cGF0aAogICAgICAgICBmaWxsPSIjZmZmIgogICAgICAgICBkPSJNMCAwaDI1NnY4MEgweiIKICAgICAgICAgaWQ9InBhdGgzIiAvPgogICAgPC9jbGlwUGF0aD4KICA8L2RlZnM+Cjwvc3ZnPgo=)](https://brainmade.org) [![Claude Code](https://img.shields.io/badge/Claude%20Code-grey?logo=claude&logoColor=d97757)](https://claude.com/product/claude-code)
[![GNU AGPLv3.0 License](https://img.shields.io/badge/License-GNU%20AGPLv3.0-dark_green?logo=gnu)](https://choosealicense.com/licenses/agpl-3.0) [![GNU AGPLv3.0 License](https://img.shields.io/badge/License-GNU%20AGPLv3.0-dark_green?logo=gnu)](https://choosealicense.com/licenses/agpl-3.0)
[![Buymeacoffee](https://img.shields.io/badge/Buymeacoffee-gray?logo=buymeacoffee)](https://buymeacoffee.com/nicolabelluti) [![Buymeacoffee](https://img.shields.io/badge/Buymeacoffee-gray?logo=buymeacoffee)](https://buymeacoffee.com/nicolabelluti)
<br> <br>
+8 -1
View File
@@ -9,6 +9,7 @@ pub struct R701 {
} }
impl R701 { impl R701 {
#[allow(clippy::missing_errors_doc)]
pub fn connect(connection_info: impl ToSocketAddrs) -> Result<Self> { pub fn connect(connection_info: impl ToSocketAddrs) -> Result<Self> {
// Create a new R701 struct // Create a new R701 struct
let mut new = Self { let mut new = Self {
@@ -21,6 +22,7 @@ impl R701 {
Ok(new) Ok(new)
} }
#[allow(clippy::missing_errors_doc)]
pub fn request(&mut self, payload: &[u8; 12]) -> Result<Vec<u8>> { pub fn request(&mut self, payload: &[u8; 12]) -> Result<Vec<u8>> {
// Create a blank request // Create a blank request
let mut request = [0x55, 0xaa, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; let mut request = [0x55, 0xaa, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
@@ -40,6 +42,7 @@ impl R701 {
Ok(buffer.fill_buf()?.to_vec()) Ok(buffer.fill_buf()?.to_vec())
} }
#[allow(clippy::missing_errors_doc)]
pub fn ping(&mut self) -> Result<()> { pub fn ping(&mut self) -> Result<()> {
// Create a request with a payload of `01 80 00 00 00 00 00 00 00 00 00 // Create a request with a payload of `01 80 00 00 00 00 00 00 00 00 00
// 00` and get the response // 00` and get the response
@@ -54,6 +57,7 @@ impl R701 {
Ok(()) Ok(())
} }
#[allow(clippy::missing_errors_doc)]
pub fn get_name(&mut self, id: u32) -> Result<Option<String>> { pub fn get_name(&mut self, id: u32) -> Result<Option<String>> {
// Create a request with a payload of `01 c7 xx xx xx xx 00 00 00 00 14 // Create a request with a payload of `01 c7 xx xx xx xx 00 00 00 00 14
// 00`, where `xx xx xx xx` is the employee ID in little endian // 00`, where `xx xx xx xx` is the employee ID in little endian
@@ -89,6 +93,7 @@ impl R701 {
Ok(Some(name).filter(|name| !name.is_empty())) Ok(Some(name).filter(|name| !name.is_empty()))
} }
#[allow(clippy::missing_errors_doc)]
pub fn get_total_record_count(&mut self) -> Result<u16> { pub fn get_total_record_count(&mut self) -> Result<u16> {
// Create a request with a payload of `01 b4 08 00 00 00 00 00 ff ff 00 // Create a request with a payload of `01 b4 08 00 00 00 00 00 ff ff 00
// 00` and get the response // 00` and get the response
@@ -109,6 +114,7 @@ impl R701 {
Ok(u16::from_le_bytes(record_count_le)) Ok(u16::from_le_bytes(record_count_le))
} }
#[allow(clippy::missing_errors_doc)]
pub fn get_record_bytes( pub fn get_record_bytes(
&mut self, &mut self,
total_records: u16, total_records: u16,
@@ -146,7 +152,8 @@ impl R701 {
Ok(response[12..1036].to_vec()) Ok(response[12..1036].to_vec())
} }
pub fn into_record_iter(&mut self) -> Result<RecordIterator> { #[allow(clippy::missing_errors_doc)]
pub fn into_record_iter(&mut self) -> Result<RecordIterator<'_>> {
RecordIterator::from(self) RecordIterator::from(self)
} }
} }
+2 -1
View File
@@ -11,6 +11,7 @@ pub struct RecordIterator<'a> {
} }
impl<'a> RecordIterator<'a> { impl<'a> RecordIterator<'a> {
#[allow(clippy::missing_errors_doc)]
pub fn from(r701: &'a mut R701) -> Result<Self> { pub fn from(r701: &'a mut R701) -> Result<Self> {
// Get the total number of records // Get the total number of records
let total_records = r701.get_total_record_count()?; let total_records = r701.get_total_record_count()?;
@@ -44,7 +45,7 @@ impl<'a> RecordIterator<'a> {
} }
} }
impl<'a> Iterator for RecordIterator<'a> { impl Iterator for RecordIterator<'_> {
type Item = Record; type Item = Record;
fn next(&mut self) -> Option<Self::Item> { fn next(&mut self) -> Option<Self::Item> {