tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test.rs (426B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 pub fn assert_de<T>(data: &T, json: serde_json::Value)
      6 where
      7    T: std::fmt::Debug,
      8    T: std::cmp::PartialEq,
      9    T: serde::de::DeserializeOwned,
     10 {
     11    assert_eq!(data, &serde_json::from_value::<T>(json).unwrap());
     12 }