mirror of
https://github.com/holofermes/ghee.git
synced 2026-08-05 11:55:57 +02:00
the lints rust 1.97 clippy added
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
# Changelog
|
||||
|
||||
## 0.3.0 - 2026-08-04
|
||||
|
||||
Ported to Rust.
|
||||
|
||||
- Any executable is a scene (see `docs/procedural.md` for the wire
|
||||
contract).
|
||||
- The `ghee-render` wheel carries the embedded renderer and the
|
||||
procedural-scene shim in one package.
|
||||
- The deb carries the `ghee` command and the Python package in one, per
|
||||
arch.
|
||||
- `docs/http.md`: the console's HTTP API.
|
||||
- u8 data arrays.
|
||||
- `st7789`: 12-bit colour and partial row updates.
|
||||
- The H264 fanout fails fast to the client.
|
||||
- `ghee bench`: the benchmark suite, in the binary.
|
||||
- `golden --dump` writes the frames out.
|
||||
@@ -113,8 +113,7 @@ fn window(
|
||||
fn pack_rgb444(frame: &[u8], out: &mut Vec<u8>) {
|
||||
out.clear();
|
||||
let mut px = frame.chunks_exact(3);
|
||||
loop {
|
||||
let Some(a) = px.next() else { break };
|
||||
while let Some(a) = px.next() {
|
||||
let b = px.next().unwrap_or(&[0, 0, 0]);
|
||||
out.push((a[0] & 0xF0) | (a[1] >> 4));
|
||||
out.push((a[2] & 0xF0) | (b[0] >> 4));
|
||||
|
||||
+1
-4
@@ -498,10 +498,7 @@ fn pump(mut stdout: ChildStdout, tx: &SyncSender<Vec<u8>>) {
|
||||
Ok(n) => n,
|
||||
};
|
||||
buf.extend_from_slice(&chunk[..n]);
|
||||
loop {
|
||||
let Some(first) = find_aud(&buf, 0) else {
|
||||
break;
|
||||
};
|
||||
while let Some(first) = find_aud(&buf, 0) {
|
||||
let Some(next) = find_aud(&buf, first + 4) else {
|
||||
break;
|
||||
};
|
||||
|
||||
+3
-8
@@ -1064,12 +1064,10 @@ fn boundary(s: &[char], i: usize) -> bool {
|
||||
}
|
||||
|
||||
fn starts_with(src: &[char], i: usize, pat: &str) -> bool {
|
||||
let mut k = i;
|
||||
for c in pat.chars() {
|
||||
if src.get(k) != Some(&c) {
|
||||
for (k, c) in pat.chars().enumerate() {
|
||||
if src.get(i + k) != Some(&c) {
|
||||
return false;
|
||||
}
|
||||
k += 1;
|
||||
}
|
||||
true
|
||||
}
|
||||
@@ -1225,10 +1223,7 @@ fn find_varying(body: &[char]) -> Option<String> {
|
||||
if hit.is_some() {
|
||||
return hit;
|
||||
}
|
||||
match body[line..].iter().position(|c| *c == '\n') {
|
||||
Some(p) => line += p + 1,
|
||||
None => return None,
|
||||
}
|
||||
line += body[line..].iter().position(|c| *c == '\n')? + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user