Procházet zdrojové kódy

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

for new protobuf version 2.14.0 and remove exact version requirement for
protobuf.
Johannes Hofmann před 5 roky
rodič
revize
3dfd10b765
3 změnil soubory, kde provedl 49 přidání a 91 odebrání
  1. 1
    1
      Cargo.toml
  2. 8
    14
      src/proto/fileformat.rs
  3. 40
    76
      src/proto/osmformat.rs

+ 1
- 1
Cargo.toml Zobrazit soubor

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

+ 8
- 14
src/proto/fileformat.rs Zobrazit soubor

@@ -1,4 +1,4 @@
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 2
 // @generated
3 3
 
4 4
 // https://github.com/rust-lang/rust-clippy/issues/702
@@ -24,7 +24,7 @@ use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
24 24
 
25 25
 /// Generated files are compatible only with the same version
26 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 29
 #[derive(PartialEq,Clone,Default,Debug)]
30 30
 pub struct Blob {
@@ -325,10 +325,7 @@ impl ::protobuf::Message for Blob {
325 325
     }
326 326
 
327 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 329
         unsafe {
333 330
             instance.get(Blob::new)
334 331
         }
@@ -347,8 +344,8 @@ impl ::protobuf::Clear for Blob {
347 344
 }
348 345
 
349 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,10 +562,7 @@ impl ::protobuf::Message for BlobHeader {
565 562
     }
566 563
 
567 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 566
         unsafe {
573 567
             instance.get(BlobHeader::new)
574 568
         }
@@ -585,7 +579,7 @@ impl ::protobuf::Clear for BlobHeader {
585 579
 }
586 580
 
587 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 Zobrazit soubor

@@ -1,4 +1,4 @@
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 2
 // @generated
3 3
 
4 4
 // https://github.com/rust-lang/rust-clippy/issues/702
@@ -24,7 +24,7 @@ use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
24 24
 
25 25
 /// Generated files are compatible only with the same version
26 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 29
 #[derive(PartialEq,Clone,Default,Debug)]
30 30
 pub struct HeaderBlock {
@@ -433,10 +433,7 @@ impl ::protobuf::Message for HeaderBlock {
433 433
     }
434 434
 
435 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 437
         unsafe {
441 438
             instance.get(HeaderBlock::new)
442 439
         }
@@ -458,8 +455,8 @@ impl ::protobuf::Clear for HeaderBlock {
458 455
 }
459 456
 
460 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,10 +686,7 @@ impl ::protobuf::Message for HeaderBBox {
689 686
     }
690 687
 
691 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 690
         unsafe {
697 691
             instance.get(HeaderBBox::new)
698 692
         }
@@ -710,8 +704,8 @@ impl ::protobuf::Clear for HeaderBBox {
710 704
 }
711 705
 
712 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,10 +1020,7 @@ impl ::protobuf::Message for PrimitiveBlock {
1026 1020
     }
1027 1021
 
1028 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 1024
         unsafe {
1034 1025
             instance.get(PrimitiveBlock::new)
1035 1026
         }
@@ -1049,8 +1040,8 @@ impl ::protobuf::Clear for PrimitiveBlock {
1049 1040
 }
1050 1041
 
1051 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,10 +1350,7 @@ impl ::protobuf::Message for PrimitiveGroup {
1359 1350
     }
1360 1351
 
1361 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 1354
         unsafe {
1367 1355
             instance.get(PrimitiveGroup::new)
1368 1356
         }
@@ -1381,8 +1369,8 @@ impl ::protobuf::Clear for PrimitiveGroup {
1381 1369
 }
1382 1370
 
1383 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,10 +1491,7 @@ impl ::protobuf::Message for StringTable {
1503 1491
     }
1504 1492
 
1505 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 1495
         unsafe {
1511 1496
             instance.get(StringTable::new)
1512 1497
         }
@@ -1521,8 +1506,8 @@ impl ::protobuf::Clear for StringTable {
1521 1506
 }
1522 1507
 
1523 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,10 +1791,7 @@ impl ::protobuf::Message for Info {
1806 1791
     }
1807 1792
 
1808 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 1795
         unsafe {
1814 1796
             instance.get(Info::new)
1815 1797
         }
@@ -1829,8 +1811,8 @@ impl ::protobuf::Clear for Info {
1829 1811
 }
1830 1812
 
1831 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,10 +2138,7 @@ impl ::protobuf::Message for DenseInfo {
2156 2138
     }
2157 2139
 
2158 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 2142
         unsafe {
2164 2143
             instance.get(DenseInfo::new)
2165 2144
         }
@@ -2179,8 +2158,8 @@ impl ::protobuf::Clear for DenseInfo {
2179 2158
 }
2180 2159
 
2181 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,10 +2281,7 @@ impl ::protobuf::Message for ChangeSet {
2302 2281
     }
2303 2282
 
2304 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 2285
         unsafe {
2310 2286
             instance.get(ChangeSet::new)
2311 2287
         }
@@ -2320,8 +2296,8 @@ impl ::protobuf::Clear for ChangeSet {
2320 2296
 }
2321 2297
 
2322 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,10 +2622,7 @@ impl ::protobuf::Message for Node {
2646 2622
     }
2647 2623
 
2648 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 2626
         unsafe {
2654 2627
             instance.get(Node::new)
2655 2628
         }
@@ -2669,8 +2642,8 @@ impl ::protobuf::Clear for Node {
2669 2642
 }
2670 2643
 
2671 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,10 +2940,7 @@ impl ::protobuf::Message for DenseNodes {
2967 2940
     }
2968 2941
 
2969 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 2944
         unsafe {
2975 2945
             instance.get(DenseNodes::new)
2976 2946
         }
@@ -2989,8 +2959,8 @@ impl ::protobuf::Clear for DenseNodes {
2989 2959
 }
2990 2960
 
2991 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,10 +3253,7 @@ impl ::protobuf::Message for Way {
3283 3253
     }
3284 3254
 
3285 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 3257
         unsafe {
3291 3258
             instance.get(Way::new)
3292 3259
         }
@@ -3305,8 +3272,8 @@ impl ::protobuf::Clear for Way {
3305 3272
 }
3306 3273
 
3307 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,10 +3646,7 @@ impl ::protobuf::Message for Relation {
3679 3646
     }
3680 3647
 
3681 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 3650
         unsafe {
3687 3651
             instance.get(Relation::new)
3688 3652
         }
@@ -3703,8 +3667,8 @@ impl ::protobuf::Clear for Relation {
3703 3667
 }
3704 3668
 
3705 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,7 +3713,7 @@ impl ::std::default::Default for Relation_MemberType {
3749 3713
 }
3750 3714
 
3751 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
 }