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"
version = "0.1.0"
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

View File

@ -6,7 +6,7 @@
/// `u64`, and `usize`, to provide methods to make integers aligned to a
/// power of two.
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;
/// Returns to the smallest number that is greater than or equal to