Update rust toolchain

This commit is contained in:
Dude so hot committed 2026-08-22 19:21:05 +08:00
1 parent 06d4abd916
commit 5cd2496f7f
4 files changed
+280 -378

No files matched your search

+275 -373
View File
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -16,7 +16,7 @@ regex-lite = "0.1"
jni = { version = "0.21", optional = true }
jni_fn = { version = "0.1", optional = true }
chrono = { version = "0.4", default-features = false, features = ["std"] }
quick-xml = { default-features = false, version = "0.40" }
quick-xml = { default-features = false, version = "0.41" }
tl = { git = "https://github.com/FooIbar/tl.git", features = ["simd"] }
log = "0.4"
android_logger = { default-features = false, version = "0.15" }
+3 -3
View File
@@ -9,20 +9,20 @@ use std::f32::consts::FRAC_1_SQRT_2;
fn image_buffer_to_luma8<P: CustomPixel>(
src: &ImageBuffer<P, &[P::Subpixel]>,
) -> Luma8LuminanceSource {
) -> Result<Luma8LuminanceSource> {
let (w, h) = src.dimensions();
let mut dst = GrayImage::new(w, h);
for (to, from) in dst.pixels_mut().zip(src.pixels()) {
*to = from.to_luma8();
}
Luma8LuminanceSource::new(dst.into_raw(), w, h)
Ok(Luma8LuminanceSource::new(dst.into_raw(), w, h)?)
}
pub struct QrCode;
impl ImageConsumer<bool> for QrCode {
fn apply<P: CustomPixel>(self, image: &ImageBuffer<P, &[P::Subpixel]>) -> Result<bool> {
let source = image_buffer_to_luma8(image);
let source = image_buffer_to_luma8(image)?;
let image = BinaryBitmap::new(HybridBinarizer::new(source));
match FinderPatternFinder::new(image.get_black_matrix()).find(&DecodeHints::default()) {
Ok(info) => {
+1 -1
View File
@@ -1,5 +1,5 @@
[toolchain]
channel = "nightly-2026-05-15"
channel = "nightly-2026-08-22"
components = ["rustfmt", "clippy", "rust-src"]
targets = ["aarch64-linux-android", "x86_64-linux-android"]
profile = "minimal"