andelf / andelf/rust-iconv

No longer works?

Abierto
#10 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Rust
Estrellas
11
Forks
8
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

It seems this crate has stopped working recently, with the latest Rust update perhaps?

On my Intel Mac `cargo test` passes but `cargo test --release` fails for `test_buf_reader` and e.g. `test_copy` freezes.

On my M3 Mac `cargo test` fails for `test_buf_reader` and `test_copy`.

I originally noticed that something is wrong with code like this (that still worked fine a couple of months ago); now it works with `cargo run` but results in an infinite loop with `cargo run --release`, and it seems to read the same chunk over and over again:

```rust
use iconv::IconvReader;
use std::fs::File;
use std::io::{BufRead, BufReader};

fn main() {
let file = File::open("example.txt").unwrap();
let ireader = IconvReader::new(file, "utf-8", "utf-8").unwrap();
let mut br = BufReader::new(ireader);
let mut s = String::new();
while br.read_line(&mut s).unwrap() > 0 {
println!("{s:?}");
s.clear();
}
}
```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.