Repository: harfbuzz/rustybuzz (language: rust)

Issue:
Issue when compiling 0.14.0 without `std` feature
```
   Compiling rustybuzz v0.14.0
error[E0433]: failed to resolve: use of undeclared crate or module `std`
 --> /home/jeremy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustybuzz-0.14.0/src/hb/buffer.rs:3:5
  |
3 | use std::cmp::min;
  |     ^^^ use of undeclared crate or module `std`

error[E0433]: failed to resolve: use of undeclared crate or module `std`
 --> /home/jeremy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustybuzz-0.14.0/src/hb/ot/layout/GSUB/alternate_set.rs:4:5
  |
4 | use std::convert::TryFrom;
  |     ^^^ use of undeclared crate or module `std`

error[E0433]: failed to resolve: use of undeclared crate or module `std`
 --> /home/jeremy/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustybuzz-0.14.0/src/hb/ot_layout_gsubgpos.rs:3:5
  |
3 | use std::cmp::max;
  |     ^^^ use of undeclared crate or module `std`

For more information about this error, try `rustc --explain E0433`.
error: could not compile `rustybuzz` (lib) due to 3 previous errors
```


Discussion / hints:

Fix patch:
diff --git a/src/hb/buffer.rs b/src/hb/buffer.rs
index fb103216..8ab4d036 100644
--- a/src/hb/buffer.rs
+++ b/src/hb/buffer.rs
@@ -1,6 +1,6 @@
 use alloc::{string::String, vec::Vec};
 use core::convert::TryFrom;
-use std::cmp::min;
+use core::cmp::min;
 
 use ttf_parser::GlyphId;
 
diff --git a/src/hb/ot/layout/GSUB/alternate_set.rs b/src/hb/ot/layout/GSUB/alternate_set.rs
index ae8d7ef1..42fc3983 100644
--- a/src/hb/ot/layout/GSUB/alternate_set.rs
+++ b/src/hb/ot/layout/GSUB/alternate_set.rs
@@ -1,7 +1,7 @@
 use crate::hb::ot_layout_gsubgpos::Apply;
 use crate::hb::ot_layout_gsubgpos::OT::hb_ot_apply_context_t;
 use crate::hb::ot_map::hb_ot_map_t;
-use std::convert::TryFrom;
+use core::convert::TryFrom;
 use ttf_parser::gsub::AlternateSet;
 
 impl Apply for AlternateSet<'_> {
diff --git a/src/hb/ot_layout_gsubgpos.rs b/src/hb/ot_layout_gsubgpos.rs
index 970d2d70..247110ca 100644
--- a/src/hb/ot_layout_gsubgpos.rs
+++ b/src/hb/ot_layout_gsubgpos.rs
@@ -1,6 +1,6 @@
 //! Matching of glyph patterns.
 
-use std::cmp::max;
+use core::cmp::max;
 
 use ttf_parser::opentype_layout::*;
 use ttf_parser::{GlyphId, LazyArray16};


Test patch: