David Tolnay

Results 361 issues of David Tolnay

The Visitor documentation is featured too prominently right now. Implementing Deserialize *without* a Visitor is maybe even more common. ```rust impl for Something { fn deserialize(deserializer: D) -> Result where...

docs

Currently none of the example code or documentation shows how to use Context. I would expect to see usage examples on this page: https://docs.rs/deepsize/0.1.1/deepsize/struct.Context.html @Aeledfyr

The `heapsize` crate is a popular crate with many crates depending on it and lots of downloads. From the description of deepsize, I can't tell what it would do differently...

Moved from https://github.com/dtolnay/request-for-implementation/issues/22#issuecomment-457410613: > Does anyone have preferences on which standard library types this is implemented for?

This page needs to show how the macro is supposed to be used: https://docs.rs/deepsize/0.1.1/deepsize/macro.known_deep_size.html @Aeledfyr

Currently two methods of the DeepSizeOf trait are documented as being "internal". https://github.com/Aeledfyr/deepsize/blob/8c872164c27927ab06a74bf7cabd639fbe118f6d/src/lib.rs#L80-L82 https://github.com/Aeledfyr/deepsize/blob/8c872164c27927ab06a74bf7cabd639fbe118f6d/src/lib.rs#L92-L94 I don't recognize "internal" as being standard Rust terminology. If these methods are intended to be...

Here is an example of Undefined Behavior (use after free) in safe code caused by escher. ```rust use escher::{Escher, Rebindable}; use std::cell::Cell; #[derive(Rebindable)] struct Struct

The following excerpts from https://github.com/petrosagg/escher/tree/016f4c10491741690411d7b5a080218d8399b693#the-problem-with-self-references: > The main problem with self-referencial structs is that if such a struct was somehow constructed the compiler would then have to statically prove that...

Based on https://github.com/rust-lang/unsafe-code-guidelines/issues/283 I believe the following code illustrates UB: ```rust use fallible_collections::btree::BTreeMap; fn main() { let mut map; let s = "...".to_owned(); map = BTreeMap::::new(); map.try_insert(&s, &s).unwrap(); // s...

I see a benchmark called `bench_dtoa` mentioned in the readme but I couldn't find the code for it.