1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-12-23 23:12:52 +02:00

Introduce a cargo clippy run (#2025)

This might help catch stylistic problems in our Rust code.

Related to #2587.
This commit is contained in:
Martin Geisler
2025-09-20 13:38:54 +02:00
committed by GitHub
parent 80a2f2ff71
commit 1e3be175fa
13 changed files with 81 additions and 57 deletions

View File

@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
// `DIR` matches name of C struct.
#[allow(clippy::upper_case_acronyms)]
// ANCHOR: solution
// ANCHOR: ffi
mod ffi {
@@ -40,7 +42,7 @@ mod ffi {
}
// Layout according to the macOS man page for dir(5).
#[cfg(all(target_os = "macos"))]
#[cfg(target_os = "macos")]
#[repr(C)]
pub struct dirent {
pub d_fileno: u64,