Skip to content

Conversation

Lfan-ke
Copy link

@Lfan-ke Lfan-ke commented Jun 19, 2025

No description provided.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces updated documentation, enhanced tests, CI configuration improvements, and modernizes various project files. Key updates include:

  • Added detailed examples and extensive tests for I/O traits and buffered reading.
  • Updated CI workflows and toolchain configuration for improved build/testing.
  • Refined documentation and re-exports across modules, and updated Cargo.toml metadata.

Reviewed Changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/prelude.rs Added a doc comment for re-exported I/O traits.
src/lib.rs Introduced new examples in docs and comprehensive tests.
src/impls.rs Added documentation and tests for Read trait implementations.
src/error.rs Documented re-export of error types.
src/buffered/mod.rs Added module-level documentation.
src/buffered/bufreader.rs Enhanced doc comments and added extensive tests for BufReader.
rust-toolchain Updated toolchain configuration (nightly 2025-06-18).
README.md Revamped layout with additional badges and examples.
Cargo.toml Bumped version, updated edition, author list and dependency version.
.github/workflows/ci.yml Improved CI configuration with updated actions and flags.

Cargo.toml Outdated

[dependencies]
axerrno = "0.1"
axerrno = { version = "0.1.0" }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we can't set axerrno = "0.1"?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is updated now

Cargo.toml Outdated
edition = "2021"
authors = ["Yuekai Jia <equation618@gmail.com>"]
version = "0.1.2"
edition = "2024"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep it as 2021 to make it compatible with more toolchain versions?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the task of os camp is to make it run on the latest toolchain

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bootcamp missions are not entirely correct. We prioritize the usability of the modules.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed now


on: [push, pull_request]
on:
push:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we don't trigger CI for other branch?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gh-page? ci auto dispathch ci.
is updated now:
branches-ignore:
- 'gh-pages'

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i ignored if: ${{ github.ref == env.default-branch }} before commit and i have deleted on: push: now

pull_request:
branches: [ main, master ]

workflow_dispatch: {}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any need to add workflow_dispatch option?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

manually triggering online debugging is a very convenient feature

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is only for debug. But in the real condition maybe we doesn't need it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleted currently

//!
//! ```
//! # #![allow(unused_imports)]
//! use std::io::BufReader;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why here is std::io? And what does this comment mean?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

src/impls.rs Outdated
let mut slice = &data[..];
let mut buf = [0u8; 5];

// 测试正常读取

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use English comment.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

matrix:
rust-toolchain: [nightly]
targets: [x86_64-unknown-linux-gnu, x86_64-unknown-none, riscv64gc-unknown-none-elf, aarch64-unknown-none-softfloat]
targets: [ x86_64-unknown-linux-gnu, x86_64-unknown-none, riscv64gc-unknown-none-elf, aarch64-unknown-none-softfloat ]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the extra spaces.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Ok(nread)
}

/// Reads exactly enough bytes to fill the buffer, using buffered data first

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should not mix the LINE_COMMENT and DOC_COMMENT?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

}

#[test]
fn test_new() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think some test may be not necessary, like test_new?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleted now

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.

2 participants