Don't emit `fmt::Error`
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust
- Lĩnh vực
- audio-video-rtc
Hướng nghiên cứu
The issue concerns the Display impl for Device and its use of fmt::Error when self.description() fails, plus a proposal to add a .name() method to DeviceTrait. Read the Device and DeviceTrait definitions and the host backends that implement them before anything else. Done would mean the agreed design is settled, the fmt::Error mapping is removed from the hosts, and the affected tests pass. Because the API direction is still open, confirm it with maintainers before editing.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
From fmt::Error's doc comment:
This type does not support transmission of an error other than that an error occurred. This is because, despite the existence of this error, string formatting is considered an infallible operation.
fmt()implementors should not return this Error unless they received it from theirFormatter. The only time your code should create a new instance of this error is when implementingfmt::Write, in order to cancel the formatting operation when writing to the underlying stream fails.
We currently have this in almost every host:
impl fmt::Display for Device {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let desc = self.description().map_err(|_| fmt::Error)?;
f.write_str(desc.name())
}
}
I find Device implementing Display strange anyway. How about we add a .name() function to DeviceTrait instead?
- Ngôn ngữ chính
- Rust
- Star
- 4k
- Fork
- 554
- Merge trung bình
- 3 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của RustAudio/cpal
-
aaudio: dynamic buffer tuning never grows the buffer (set_buffer_size_in_frames reports Err on success)Có thể đã có người làm @dannyward630 đã nhận 10 ngày trước. Đang mởhost - aaudio platform - android
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
WebAudio wasm build fails with wasm-bindgen panic=unwind closuresCó thể đã có người làm @bogusyogi đã nhận 18 ngày trước. Đang mởhost - webaudio platform - web
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
RustAudio/cpal#1394 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Load libasound at runtime, or make the ALSA host optional, so Linux binaries don't require libasoundĐang mởdependencies host - alsa platform - linux
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 14/100
RustAudio/cpal#1421 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
New WASAPI implementationCó thể đã có người làm @LastExceed đã nhận 2 ngày trước. Đang mởcode quality dependencies host - wasapi platform - windows
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
RustAudio/cpal#1416 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
host - pipewire platform - linux
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 52/100
RustAudio/cpal#1405 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của RustAudio/cpal
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`nsh-core` fails to compile when taffy's default `calc` feature is enabled elsewhere in the graphĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
longbridge/nsh#966 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Windows docs: pin a tested ConPTY version for Kitty graphics; 1.25.260930003 corrupts large uploadsĐang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
raphamorim/rio#2021 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
hydro-project/infinity#187 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
near/near-sdk-rs#1676 ·
Maintainer thường phản hồi trong vòng 2 ngày