)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"85ccc77bcdf991030911a379904205f46803b732","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"09110606_58b60d59","updated":"2024-08-19 14:41:30.000000000","message":"lgtm","commit_id":"4d0a3ac854881a8708f4d61eca13d852791fdb5c"}],"tvix/nix-compat/src/narinfo/signature.rs":[{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"f5a6a269a4bf80374baf3290af93f36e930e210b","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"#[derive(Clone, Debug, Eq, PartialEq)]"},{"line_number":10,"context_line":"pub struct Signature {"},{"line_number":11,"context_line":"    name: SmolStr,"},{"line_number":12,"context_line":"    bytes: ed25519::SignatureBytes,"},{"line_number":13,"context_line":"}"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"1ad160f9_c9f382ec","line":11,"updated":"2024-08-19 14:56:11.000000000","message":"I might try another approach here, essentially generalizing on owned string containers. There\u0027s little reason this shouldn\u0027t work with both String and SmolStr.","commit_id":"4d0a3ac854881a8708f4d61eca13d852791fdb5c"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"4441d9c7803ea373e9ea3dacb374537884d5b210","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"#[derive(Clone, Debug, Eq, PartialEq)]"},{"line_number":10,"context_line":"pub struct Signature {"},{"line_number":11,"context_line":"    name: SmolStr,"},{"line_number":12,"context_line":"    bytes: ed25519::SignatureBytes,"},{"line_number":13,"context_line":"}"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"d0cb9425_af2cc812","line":11,"in_reply_to":"1ad160f9_c9f382ec","updated":"2024-08-19 19:14:33.000000000","message":"Went with a `S: Deref\u003cTarget \u003d str\u003e` as type parameter for `Signature`, which works for both `SmolStr` and `String`, and `\u0026str` too! So no need for separate struct and a lot of redundant code!\n\nThis avoids pulling in `smol_str` as a regular dependency for nix-compat.\n\nI added a test, too.","commit_id":"4d0a3ac854881a8708f4d61eca13d852791fdb5c"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"85ccc77bcdf991030911a379904205f46803b732","unresolved":true,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"impl Display for Signature {"},{"line_number":71,"context_line":"    fn fmt(\u0026self, w: \u0026mut fmt::Formatter) -\u003e fmt::Result {"},{"line_number":72,"context_line":"        write!(w, \"{}:{}\", self.name, BASE64.encode(\u0026self.bytes))"},{"line_number":73,"context_line":"    }"},{"line_number":74,"context_line":"}"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"5f689ae1_49a7820c","line":72,"updated":"2024-08-19 14:41:30.000000000","message":"shouldn\u0027t you forward display to the reference version?","commit_id":"4d0a3ac854881a8708f4d61eca13d852791fdb5c"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"4441d9c7803ea373e9ea3dacb374537884d5b210","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"impl Display for Signature {"},{"line_number":71,"context_line":"    fn fmt(\u0026self, w: \u0026mut fmt::Formatter) -\u003e fmt::Result {"},{"line_number":72,"context_line":"        write!(w, \"{}:{}\", self.name, BASE64.encode(\u0026self.bytes))"},{"line_number":73,"context_line":"    }"},{"line_number":74,"context_line":"}"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"abe6df78_6e9f0ef3","line":72,"in_reply_to":"5f689ae1_49a7820c","updated":"2024-08-19 19:14:33.000000000","message":"Done","commit_id":"4d0a3ac854881a8708f4d61eca13d852791fdb5c"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"85ccc77bcdf991030911a379904205f46803b732","unresolved":true,"context_lines":[{"line_number":111,"context_line":"        Ok(Self { name, bytes })"},{"line_number":112,"context_line":"    }"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    fn to_owned(\u0026self) -\u003e Signature {"},{"line_number":115,"context_line":"        Signature {"},{"line_number":116,"context_line":"            name: self.name.into(),"},{"line_number":117,"context_line":"            bytes: self.bytes,"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"79b28b7f_8a54abe9","line":114,"updated":"2024-08-19 14:41:30.000000000","message":"`std::Borrow::ToOwned` no?","commit_id":"4d0a3ac854881a8708f4d61eca13d852791fdb5c"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"4441d9c7803ea373e9ea3dacb374537884d5b210","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        Ok(Self { name, bytes })"},{"line_number":112,"context_line":"    }"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    fn to_owned(\u0026self) -\u003e Signature {"},{"line_number":115,"context_line":"        Signature {"},{"line_number":116,"context_line":"            name: self.name.into(),"},{"line_number":117,"context_line":"            bytes: self.bytes,"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"0bce8366_b260e469","line":114,"in_reply_to":"067ab5db_ed7130dd","updated":"2024-08-19 19:14:33.000000000","message":"Resolved","commit_id":"4d0a3ac854881a8708f4d61eca13d852791fdb5c"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"f5a6a269a4bf80374baf3290af93f36e930e210b","unresolved":true,"context_lines":[{"line_number":111,"context_line":"        Ok(Self { name, bytes })"},{"line_number":112,"context_line":"    }"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    fn to_owned(\u0026self) -\u003e Signature {"},{"line_number":115,"context_line":"        Signature {"},{"line_number":116,"context_line":"            name: self.name.into(),"},{"line_number":117,"context_line":"            bytes: self.bytes,"}],"source_content_type":"text/x-rustsrc","patch_set":2,"id":"067ab5db_ed7130dd","line":114,"in_reply_to":"79b28b7f_8a54abe9","updated":"2024-08-19 14:56:11.000000000","message":"won\u0027t work, for the same reasons as we implemented it like this in StorePathRef.","commit_id":"4d0a3ac854881a8708f4d61eca13d852791fdb5c"},{"author":{"_account_id":1000036,"name":"flokli","email":"flokli@flokli.de","username":"flokli"},"change_message_id":"9e95fe8d62ecfea1f610b978ce8d67a8ef6b71fb","unresolved":true,"context_lines":[{"line_number":69,"context_line":"    }"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    /// Returns the name field of the signature."},{"line_number":72,"context_line":"    pub fn name(\u0026self) -\u003e \u0026S {"},{"line_number":73,"context_line":"        \u0026self.name"},{"line_number":74,"context_line":"    }"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"723d1555_bd24ea96","line":72,"updated":"2024-08-19 19:16:39.000000000","message":"I opted to use `\u0026S` here and not `\u0026str` for now. It makes it slightly more annoying for the `SignatureRef` case, as that\u0027s a \u0026\u0026str and need another `*` when comparing, but it preserves whatever type the user chose, so maybe a good thing, and it\u0027s not that these additional `*` are gonna hurt us ;-)","commit_id":"574295f5229100305c104200976d51e769ce5841"},{"author":{"_account_id":1000073,"name":"raitobezarius","display_name":"Ryan Lahfa","email":"tvl@lahfa.xyz","username":"raitobezarius"},"change_message_id":"b89ddc3b3ac3d8aab98c86c4f5691327c554699e","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    }"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    /// Returns the name field of the signature."},{"line_number":72,"context_line":"    pub fn name(\u0026self) -\u003e \u0026S {"},{"line_number":73,"context_line":"        \u0026self.name"},{"line_number":74,"context_line":"    }"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-rustsrc","patch_set":3,"id":"dc95bb75_860cd388","line":72,"in_reply_to":"723d1555_bd24ea96","updated":"2024-08-19 19:32:47.000000000","message":"Acknowledged","commit_id":"574295f5229100305c104200976d51e769ce5841"}]}
