Mercurial > public > mercurial-scm > hg
comparison rust/hg-cpython/src/lib.rs @ 42557:d26e4a434fe5
rust: run rfmt on all hg-core/hg-cpython code
Differential Revision: https://phab.mercurial-scm.org/D6591
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Mon, 01 Jul 2019 10:50:18 +0200 |
parents | 5b795108dd17 |
children | 326fdce22fb2 |
comparison
equal
deleted
inserted
replaced
42553:e3df1e15bee9 | 42557:d26e4a434fe5 |
---|---|
26 | 26 |
27 pub mod ancestors; | 27 pub mod ancestors; |
28 mod cindex; | 28 mod cindex; |
29 mod conversion; | 29 mod conversion; |
30 pub mod dagops; | 30 pub mod dagops; |
31 pub mod dirstate; | |
31 pub mod discovery; | 32 pub mod discovery; |
32 pub mod exceptions; | 33 pub mod exceptions; |
33 pub mod dirstate; | |
34 pub mod filepatterns; | 34 pub mod filepatterns; |
35 | 35 |
36 py_module_initializer!(rustext, initrustext, PyInit_rustext, |py, m| { | 36 py_module_initializer!(rustext, initrustext, PyInit_rustext, |py, m| { |
37 m.add( | 37 m.add( |
38 py, | 38 py, |
43 let dotted_name: String = m.get(py, "__name__")?.extract(py)?; | 43 let dotted_name: String = m.get(py, "__name__")?.extract(py)?; |
44 m.add(py, "ancestor", ancestors::init_module(py, &dotted_name)?)?; | 44 m.add(py, "ancestor", ancestors::init_module(py, &dotted_name)?)?; |
45 m.add(py, "dagop", dagops::init_module(py, &dotted_name)?)?; | 45 m.add(py, "dagop", dagops::init_module(py, &dotted_name)?)?; |
46 m.add(py, "discovery", discovery::init_module(py, &dotted_name)?)?; | 46 m.add(py, "discovery", discovery::init_module(py, &dotted_name)?)?; |
47 m.add(py, "dirstate", dirstate::init_module(py, &dotted_name)?)?; | 47 m.add(py, "dirstate", dirstate::init_module(py, &dotted_name)?)?; |
48 m.add(py, "filepatterns", filepatterns::init_module(py, &dotted_name)?)?; | 48 m.add( |
49 py, | |
50 "filepatterns", | |
51 filepatterns::init_module(py, &dotted_name)?, | |
52 )?; | |
49 m.add(py, "GraphError", py.get_type::<exceptions::GraphError>())?; | 53 m.add(py, "GraphError", py.get_type::<exceptions::GraphError>())?; |
50 m.add(py, "PatternFileError", py.get_type::<exceptions::PatternFileError>())?; | 54 m.add( |
51 m.add(py, "PatternError", py.get_type::<exceptions::PatternError>())?; | 55 py, |
56 "PatternFileError", | |
57 py.get_type::<exceptions::PatternFileError>(), | |
58 )?; | |
59 m.add( | |
60 py, | |
61 "PatternError", | |
62 py.get_type::<exceptions::PatternError>(), | |
63 )?; | |
52 Ok(()) | 64 Ok(()) |
53 }); | 65 }); |