-
Notifications
You must be signed in to change notification settings - Fork 5
update: add CI, Example, Test and ReadmeTag #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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" } |
There was a problem hiding this comment.
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"
?
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed now
.github/workflows/ci.yml
Outdated
|
||
on: [push, pull_request] | ||
on: | ||
push: |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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'
There was a problem hiding this comment.
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
.github/workflows/ci.yml
Outdated
pull_request: | ||
branches: [ main, master ] | ||
|
||
workflow_dispatch: {} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleted currently
src/buffered/mod.rs
Outdated
//! | ||
//! ``` | ||
//! # #![allow(unused_imports)] | ||
//! use std::io::BufReader; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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]; | ||
|
||
// 测试正常读取 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use English comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
.github/workflows/ci.yml
Outdated
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 ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the extra spaces.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
src/buffered/bufreader.rs
Outdated
} | ||
|
||
#[test] | ||
fn test_new() { |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleted now
No description provided.