浏览代码

Regenerate *.rs files in `src/proto/`

for new protobuf version 2.14.0 and remove exact version requirement for
protobuf.
Johannes Hofmann 5 年前
父节点
当前提交
3dfd10b765
共有 3 个文件被更改,包括 49 次插入91 次删除
  1. 1
    1
      Cargo.toml
  2. 8
    14
      src/proto/fileformat.rs
  3. 40
    76
      src/proto/osmformat.rs

+ 1
- 1
Cargo.toml 查看文件

21
 system-libz = ["flate2"]
21
 system-libz = ["flate2"]
22
 
22
 
23
 [dependencies]
23
 [dependencies]
24
-protobuf = "=2.10.1"
24
+protobuf = "2.14"
25
 byteorder = "1.1"
25
 byteorder = "1.1"
26
 flate2 = { version = "1.0", optional = true }
26
 flate2 = { version = "1.0", optional = true }
27
 inflate = "0.4"
27
 inflate = "0.4"

+ 8
- 14
src/proto/fileformat.rs 查看文件

1
-// This file is generated by rust-protobuf 2.10.1. Do not edit
1
+// This file is generated by rust-protobuf 2.14.0. Do not edit
2
 // @generated
2
 // @generated
3
 
3
 
4
 // https://github.com/rust-lang/rust-clippy/issues/702
4
 // https://github.com/rust-lang/rust-clippy/issues/702
24
 
24
 
25
 /// Generated files are compatible only with the same version
25
 /// Generated files are compatible only with the same version
26
 /// of protobuf runtime.
26
 /// of protobuf runtime.
27
-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_10_1;
27
+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_14_0;
28
 
28
 
29
 #[derive(PartialEq,Clone,Default,Debug)]
29
 #[derive(PartialEq,Clone,Default,Debug)]
30
 pub struct Blob {
30
 pub struct Blob {
325
     }
325
     }
326
 
326
 
327
     fn default_instance() -> &'static Blob {
327
     fn default_instance() -> &'static Blob {
328
-        static mut instance: ::protobuf::lazy::Lazy<Blob> = ::protobuf::lazy::Lazy {
329
-            lock: ::protobuf::lazy::ONCE_INIT,
330
-            ptr: 0 as *const Blob,
331
-        };
328
+        static mut instance: ::protobuf::lazy::Lazy<Blob> = ::protobuf::lazy::Lazy::INIT;
332
         unsafe {
329
         unsafe {
333
             instance.get(Blob::new)
330
             instance.get(Blob::new)
334
         }
331
         }
347
 }
344
 }
348
 
345
 
349
 impl ::protobuf::reflect::ProtobufValue for Blob {
346
 impl ::protobuf::reflect::ProtobufValue for Blob {
350
-    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
351
-        ::protobuf::reflect::ProtobufValueRef::Message(self)
347
+    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
348
+        ::protobuf::reflect::ReflectValueRef::Message(self)
352
     }
349
     }
353
 }
350
 }
354
 
351
 
565
     }
562
     }
566
 
563
 
567
     fn default_instance() -> &'static BlobHeader {
564
     fn default_instance() -> &'static BlobHeader {
568
-        static mut instance: ::protobuf::lazy::Lazy<BlobHeader> = ::protobuf::lazy::Lazy {
569
-            lock: ::protobuf::lazy::ONCE_INIT,
570
-            ptr: 0 as *const BlobHeader,
571
-        };
565
+        static mut instance: ::protobuf::lazy::Lazy<BlobHeader> = ::protobuf::lazy::Lazy::INIT;
572
         unsafe {
566
         unsafe {
573
             instance.get(BlobHeader::new)
567
             instance.get(BlobHeader::new)
574
         }
568
         }
585
 }
579
 }
586
 
580
 
587
 impl ::protobuf::reflect::ProtobufValue for BlobHeader {
581
 impl ::protobuf::reflect::ProtobufValue for BlobHeader {
588
-    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
589
-        ::protobuf::reflect::ProtobufValueRef::Message(self)
582
+    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
583
+        ::protobuf::reflect::ReflectValueRef::Message(self)
590
     }
584
     }
591
 }
585
 }

+ 40
- 76
src/proto/osmformat.rs 查看文件

1
-// This file is generated by rust-protobuf 2.10.1. Do not edit
1
+// This file is generated by rust-protobuf 2.14.0. Do not edit
2
 // @generated
2
 // @generated
3
 
3
 
4
 // https://github.com/rust-lang/rust-clippy/issues/702
4
 // https://github.com/rust-lang/rust-clippy/issues/702
24
 
24
 
25
 /// Generated files are compatible only with the same version
25
 /// Generated files are compatible only with the same version
26
 /// of protobuf runtime.
26
 /// of protobuf runtime.
27
-// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_10_1;
27
+// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_14_0;
28
 
28
 
29
 #[derive(PartialEq,Clone,Default,Debug)]
29
 #[derive(PartialEq,Clone,Default,Debug)]
30
 pub struct HeaderBlock {
30
 pub struct HeaderBlock {
433
     }
433
     }
434
 
434
 
435
     fn default_instance() -> &'static HeaderBlock {
435
     fn default_instance() -> &'static HeaderBlock {
436
-        static mut instance: ::protobuf::lazy::Lazy<HeaderBlock> = ::protobuf::lazy::Lazy {
437
-            lock: ::protobuf::lazy::ONCE_INIT,
438
-            ptr: 0 as *const HeaderBlock,
439
-        };
436
+        static mut instance: ::protobuf::lazy::Lazy<HeaderBlock> = ::protobuf::lazy::Lazy::INIT;
440
         unsafe {
437
         unsafe {
441
             instance.get(HeaderBlock::new)
438
             instance.get(HeaderBlock::new)
442
         }
439
         }
458
 }
455
 }
459
 
456
 
460
 impl ::protobuf::reflect::ProtobufValue for HeaderBlock {
457
 impl ::protobuf::reflect::ProtobufValue for HeaderBlock {
461
-    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
462
-        ::protobuf::reflect::ProtobufValueRef::Message(self)
458
+    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
459
+        ::protobuf::reflect::ReflectValueRef::Message(self)
463
     }
460
     }
464
 }
461
 }
465
 
462
 
689
     }
686
     }
690
 
687
 
691
     fn default_instance() -> &'static HeaderBBox {
688
     fn default_instance() -> &'static HeaderBBox {
692
-        static mut instance: ::protobuf::lazy::Lazy<HeaderBBox> = ::protobuf::lazy::Lazy {
693
-            lock: ::protobuf::lazy::ONCE_INIT,
694
-            ptr: 0 as *const HeaderBBox,
695
-        };
689
+        static mut instance: ::protobuf::lazy::Lazy<HeaderBBox> = ::protobuf::lazy::Lazy::INIT;
696
         unsafe {
690
         unsafe {
697
             instance.get(HeaderBBox::new)
691
             instance.get(HeaderBBox::new)
698
         }
692
         }
710
 }
704
 }
711
 
705
 
712
 impl ::protobuf::reflect::ProtobufValue for HeaderBBox {
706
 impl ::protobuf::reflect::ProtobufValue for HeaderBBox {
713
-    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
714
-        ::protobuf::reflect::ProtobufValueRef::Message(self)
707
+    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
708
+        ::protobuf::reflect::ReflectValueRef::Message(self)
715
     }
709
     }
716
 }
710
 }
717
 
711
 
1026
     }
1020
     }
1027
 
1021
 
1028
     fn default_instance() -> &'static PrimitiveBlock {
1022
     fn default_instance() -> &'static PrimitiveBlock {
1029
-        static mut instance: ::protobuf::lazy::Lazy<PrimitiveBlock> = ::protobuf::lazy::Lazy {
1030
-            lock: ::protobuf::lazy::ONCE_INIT,
1031
-            ptr: 0 as *const PrimitiveBlock,
1032
-        };
1023
+        static mut instance: ::protobuf::lazy::Lazy<PrimitiveBlock> = ::protobuf::lazy::Lazy::INIT;
1033
         unsafe {
1024
         unsafe {
1034
             instance.get(PrimitiveBlock::new)
1025
             instance.get(PrimitiveBlock::new)
1035
         }
1026
         }
1049
 }
1040
 }
1050
 
1041
 
1051
 impl ::protobuf::reflect::ProtobufValue for PrimitiveBlock {
1042
 impl ::protobuf::reflect::ProtobufValue for PrimitiveBlock {
1052
-    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
1053
-        ::protobuf::reflect::ProtobufValueRef::Message(self)
1043
+    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
1044
+        ::protobuf::reflect::ReflectValueRef::Message(self)
1054
     }
1045
     }
1055
 }
1046
 }
1056
 
1047
 
1359
     }
1350
     }
1360
 
1351
 
1361
     fn default_instance() -> &'static PrimitiveGroup {
1352
     fn default_instance() -> &'static PrimitiveGroup {
1362
-        static mut instance: ::protobuf::lazy::Lazy<PrimitiveGroup> = ::protobuf::lazy::Lazy {
1363
-            lock: ::protobuf::lazy::ONCE_INIT,
1364
-            ptr: 0 as *const PrimitiveGroup,
1365
-        };
1353
+        static mut instance: ::protobuf::lazy::Lazy<PrimitiveGroup> = ::protobuf::lazy::Lazy::INIT;
1366
         unsafe {
1354
         unsafe {
1367
             instance.get(PrimitiveGroup::new)
1355
             instance.get(PrimitiveGroup::new)
1368
         }
1356
         }
1381
 }
1369
 }
1382
 
1370
 
1383
 impl ::protobuf::reflect::ProtobufValue for PrimitiveGroup {
1371
 impl ::protobuf::reflect::ProtobufValue for PrimitiveGroup {
1384
-    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
1385
-        ::protobuf::reflect::ProtobufValueRef::Message(self)
1372
+    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
1373
+        ::protobuf::reflect::ReflectValueRef::Message(self)
1386
     }
1374
     }
1387
 }
1375
 }
1388
 
1376
 
1503
     }
1491
     }
1504
 
1492
 
1505
     fn default_instance() -> &'static StringTable {
1493
     fn default_instance() -> &'static StringTable {
1506
-        static mut instance: ::protobuf::lazy::Lazy<StringTable> = ::protobuf::lazy::Lazy {
1507
-            lock: ::protobuf::lazy::ONCE_INIT,
1508
-            ptr: 0 as *const StringTable,
1509
-        };
1494
+        static mut instance: ::protobuf::lazy::Lazy<StringTable> = ::protobuf::lazy::Lazy::INIT;
1510
         unsafe {
1495
         unsafe {
1511
             instance.get(StringTable::new)
1496
             instance.get(StringTable::new)
1512
         }
1497
         }
1521
 }
1506
 }
1522
 
1507
 
1523
 impl ::protobuf::reflect::ProtobufValue for StringTable {
1508
 impl ::protobuf::reflect::ProtobufValue for StringTable {
1524
-    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
1525
-        ::protobuf::reflect::ProtobufValueRef::Message(self)
1509
+    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
1510
+        ::protobuf::reflect::ReflectValueRef::Message(self)
1526
     }
1511
     }
1527
 }
1512
 }
1528
 
1513
 
1806
     }
1791
     }
1807
 
1792
 
1808
     fn default_instance() -> &'static Info {
1793
     fn default_instance() -> &'static Info {
1809
-        static mut instance: ::protobuf::lazy::Lazy<Info> = ::protobuf::lazy::Lazy {
1810
-            lock: ::protobuf::lazy::ONCE_INIT,
1811
-            ptr: 0 as *const Info,
1812
-        };
1794
+        static mut instance: ::protobuf::lazy::Lazy<Info> = ::protobuf::lazy::Lazy::INIT;
1813
         unsafe {
1795
         unsafe {
1814
             instance.get(Info::new)
1796
             instance.get(Info::new)
1815
         }
1797
         }
1829
 }
1811
 }
1830
 
1812
 
1831
 impl ::protobuf::reflect::ProtobufValue for Info {
1813
 impl ::protobuf::reflect::ProtobufValue for Info {
1832
-    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
1833
-        ::protobuf::reflect::ProtobufValueRef::Message(self)
1814
+    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
1815
+        ::protobuf::reflect::ReflectValueRef::Message(self)
1834
     }
1816
     }
1835
 }
1817
 }
1836
 
1818
 
2156
     }
2138
     }
2157
 
2139
 
2158
     fn default_instance() -> &'static DenseInfo {
2140
     fn default_instance() -> &'static DenseInfo {
2159
-        static mut instance: ::protobuf::lazy::Lazy<DenseInfo> = ::protobuf::lazy::Lazy {
2160
-            lock: ::protobuf::lazy::ONCE_INIT,
2161
-            ptr: 0 as *const DenseInfo,
2162
-        };
2141
+        static mut instance: ::protobuf::lazy::Lazy<DenseInfo> = ::protobuf::lazy::Lazy::INIT;
2163
         unsafe {
2142
         unsafe {
2164
             instance.get(DenseInfo::new)
2143
             instance.get(DenseInfo::new)
2165
         }
2144
         }
2179
 }
2158
 }
2180
 
2159
 
2181
 impl ::protobuf::reflect::ProtobufValue for DenseInfo {
2160
 impl ::protobuf::reflect::ProtobufValue for DenseInfo {
2182
-    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
2183
-        ::protobuf::reflect::ProtobufValueRef::Message(self)
2161
+    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
2162
+        ::protobuf::reflect::ReflectValueRef::Message(self)
2184
     }
2163
     }
2185
 }
2164
 }
2186
 
2165
 
2302
     }
2281
     }
2303
 
2282
 
2304
     fn default_instance() -> &'static ChangeSet {
2283
     fn default_instance() -> &'static ChangeSet {
2305
-        static mut instance: ::protobuf::lazy::Lazy<ChangeSet> = ::protobuf::lazy::Lazy {
2306
-            lock: ::protobuf::lazy::ONCE_INIT,
2307
-            ptr: 0 as *const ChangeSet,
2308
-        };
2284
+        static mut instance: ::protobuf::lazy::Lazy<ChangeSet> = ::protobuf::lazy::Lazy::INIT;
2309
         unsafe {
2285
         unsafe {
2310
             instance.get(ChangeSet::new)
2286
             instance.get(ChangeSet::new)
2311
         }
2287
         }
2320
 }
2296
 }
2321
 
2297
 
2322
 impl ::protobuf::reflect::ProtobufValue for ChangeSet {
2298
 impl ::protobuf::reflect::ProtobufValue for ChangeSet {
2323
-    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
2324
-        ::protobuf::reflect::ProtobufValueRef::Message(self)
2299
+    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
2300
+        ::protobuf::reflect::ReflectValueRef::Message(self)
2325
     }
2301
     }
2326
 }
2302
 }
2327
 
2303
 
2646
     }
2622
     }
2647
 
2623
 
2648
     fn default_instance() -> &'static Node {
2624
     fn default_instance() -> &'static Node {
2649
-        static mut instance: ::protobuf::lazy::Lazy<Node> = ::protobuf::lazy::Lazy {
2650
-            lock: ::protobuf::lazy::ONCE_INIT,
2651
-            ptr: 0 as *const Node,
2652
-        };
2625
+        static mut instance: ::protobuf::lazy::Lazy<Node> = ::protobuf::lazy::Lazy::INIT;
2653
         unsafe {
2626
         unsafe {
2654
             instance.get(Node::new)
2627
             instance.get(Node::new)
2655
         }
2628
         }
2669
 }
2642
 }
2670
 
2643
 
2671
 impl ::protobuf::reflect::ProtobufValue for Node {
2644
 impl ::protobuf::reflect::ProtobufValue for Node {
2672
-    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
2673
-        ::protobuf::reflect::ProtobufValueRef::Message(self)
2645
+    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
2646
+        ::protobuf::reflect::ReflectValueRef::Message(self)
2674
     }
2647
     }
2675
 }
2648
 }
2676
 
2649
 
2967
     }
2940
     }
2968
 
2941
 
2969
     fn default_instance() -> &'static DenseNodes {
2942
     fn default_instance() -> &'static DenseNodes {
2970
-        static mut instance: ::protobuf::lazy::Lazy<DenseNodes> = ::protobuf::lazy::Lazy {
2971
-            lock: ::protobuf::lazy::ONCE_INIT,
2972
-            ptr: 0 as *const DenseNodes,
2973
-        };
2943
+        static mut instance: ::protobuf::lazy::Lazy<DenseNodes> = ::protobuf::lazy::Lazy::INIT;
2974
         unsafe {
2944
         unsafe {
2975
             instance.get(DenseNodes::new)
2945
             instance.get(DenseNodes::new)
2976
         }
2946
         }
2989
 }
2959
 }
2990
 
2960
 
2991
 impl ::protobuf::reflect::ProtobufValue for DenseNodes {
2961
 impl ::protobuf::reflect::ProtobufValue for DenseNodes {
2992
-    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
2993
-        ::protobuf::reflect::ProtobufValueRef::Message(self)
2962
+    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
2963
+        ::protobuf::reflect::ReflectValueRef::Message(self)
2994
     }
2964
     }
2995
 }
2965
 }
2996
 
2966
 
3283
     }
3253
     }
3284
 
3254
 
3285
     fn default_instance() -> &'static Way {
3255
     fn default_instance() -> &'static Way {
3286
-        static mut instance: ::protobuf::lazy::Lazy<Way> = ::protobuf::lazy::Lazy {
3287
-            lock: ::protobuf::lazy::ONCE_INIT,
3288
-            ptr: 0 as *const Way,
3289
-        };
3256
+        static mut instance: ::protobuf::lazy::Lazy<Way> = ::protobuf::lazy::Lazy::INIT;
3290
         unsafe {
3257
         unsafe {
3291
             instance.get(Way::new)
3258
             instance.get(Way::new)
3292
         }
3259
         }
3305
 }
3272
 }
3306
 
3273
 
3307
 impl ::protobuf::reflect::ProtobufValue for Way {
3274
 impl ::protobuf::reflect::ProtobufValue for Way {
3308
-    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
3309
-        ::protobuf::reflect::ProtobufValueRef::Message(self)
3275
+    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
3276
+        ::protobuf::reflect::ReflectValueRef::Message(self)
3310
     }
3277
     }
3311
 }
3278
 }
3312
 
3279
 
3679
     }
3646
     }
3680
 
3647
 
3681
     fn default_instance() -> &'static Relation {
3648
     fn default_instance() -> &'static Relation {
3682
-        static mut instance: ::protobuf::lazy::Lazy<Relation> = ::protobuf::lazy::Lazy {
3683
-            lock: ::protobuf::lazy::ONCE_INIT,
3684
-            ptr: 0 as *const Relation,
3685
-        };
3649
+        static mut instance: ::protobuf::lazy::Lazy<Relation> = ::protobuf::lazy::Lazy::INIT;
3686
         unsafe {
3650
         unsafe {
3687
             instance.get(Relation::new)
3651
             instance.get(Relation::new)
3688
         }
3652
         }
3703
 }
3667
 }
3704
 
3668
 
3705
 impl ::protobuf::reflect::ProtobufValue for Relation {
3669
 impl ::protobuf::reflect::ProtobufValue for Relation {
3706
-    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
3707
-        ::protobuf::reflect::ProtobufValueRef::Message(self)
3670
+    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
3671
+        ::protobuf::reflect::ReflectValueRef::Message(self)
3708
     }
3672
     }
3709
 }
3673
 }
3710
 
3674
 
3749
 }
3713
 }
3750
 
3714
 
3751
 impl ::protobuf::reflect::ProtobufValue for Relation_MemberType {
3715
 impl ::protobuf::reflect::ProtobufValue for Relation_MemberType {
3752
-    fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
3753
-        ::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
3716
+    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
3717
+        ::protobuf::reflect::ReflectValueRef::Enum(self.descriptor())
3754
     }
3718
     }
3755
 }
3719
 }