File: relational.rs

package info (click to toggle)
rust-sorted-iter 0.1.11-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 184 kB
  • sloc: makefile: 2
file content (18 lines) | stat: -rw-r--r-- 368 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern crate maplit;
extern crate sorted_iter;

use maplit::*;
use sorted_iter::SortedPairIterator;

fn main() {
    let city = btreemap! {
        1 => "New York",
        2 => "Tokyo",
    };
    let country = btreemap! {
        1 => "USA",
        2 => "Japan",
    };
    let res: Vec<_> = city.iter().join(country.iter()).collect();
    println!("{:?}", res);
}