Add description and license for align-ext

This commit is contained in:
Jianfeng Jiang 2024-05-23 08:26:10 +00:00 committed by Tate, Hongliang Tian
parent e192579405
commit a93f922a25
3 changed files with 4 additions and 1 deletions

View File

@ -2,5 +2,7 @@
name = "align_ext" name = "align_ext"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"
description = " An extension trait for Rust integer types to make integers aligned to a power of two"
license = "MPL-2.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -6,7 +6,7 @@
/// `u64`, and `usize`, to provide methods to make integers aligned to a /// `u64`, and `usize`, to provide methods to make integers aligned to a
/// power of two. /// power of two.
pub trait AlignExt { pub trait AlignExt {
/// returns whether the number is a power of two /// Returns whether the number is a power of two
fn is_power_of_two(&self) -> bool; fn is_power_of_two(&self) -> bool;
/// Returns to the smallest number that is greater than or equal to /// Returns to the smallest number that is greater than or equal to

View File

@ -3,3 +3,4 @@
[toolchain] [toolchain]
channel = "nightly-2024-01-01" channel = "nightly-2024-01-01"
components = ["rust-src", "rustc-dev", "llvm-tools-preview"] components = ["rust-src", "rustc-dev", "llvm-tools-preview"]
targets = ["x86_64-unknown-none"]