Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use std::fmt;
- struct Embed<T>(T);
- impl<T: fmt::Debug> fmt::Debug for Embed<T> {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f, "\u{2068}{:?}\u{2069}", self.0)
- }
- }
- fn main() {
- let arr = [
- "א",
- "ב",
- "ג",
- "a",
- "b",
- "c",
- ];
- println!("without embedding: {:?}", arr);
- println!("with embedding: {:?}", Embed(arr));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement