Skip to content

Commit 85c39bd

Browse files
author
p00512853
committed
change name
1 parent c65bffa commit 85c39bd

File tree

8 files changed

+26
-27
lines changed

8 files changed

+26
-27
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "mml"
2+
name = "rust2uml"
33
version = "0.1.59"
44
description = "A library to generating UML language from Rust's project into graphiz/dot file."
55
authors = [

examples/main.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use mml;
2-
use mml::Config;
2+
use rust2uml::Config;
33

44
use argi::{cli, data};
55

@@ -31,14 +31,14 @@ fn run(ctx: &argi::Command, _: Option<String>) {
3131
let dest: String = concat!("target/doc/", env!("CARGO_PKG_NAME")).to_string();
3232

3333
let config = command_to_config(ctx);
34-
mml::Config::set_global(config);
34+
rust2uml::Config::set_global(config);
3535

36-
let _ = mml::src2both("src", dest.replace("-", "_").as_str());
36+
let _ = rust2uml::src2both("src", dest.replace("-", "_").as_str());
3737
}
3838

3939
fn command_to_config(ctx: &argi::Command) -> Config {
4040

41-
let mut config = mml::Config::default();
41+
let mut config = rust2uml::Config::default();
4242

4343
match data!(bool, ctx => --include_fields) {
4444
Some(v) => config.include_fields = v,

src/lib.rs

+11-12
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
#![crate_name = "mml"]
1+
#![crate_name = "rust2uml"]
22
#![crate_type = "lib"]
33
#![feature(rustc_private)]
44
#![feature(box_patterns)]
5-
#![doc(html_root_url = "https://docs.rs/mml/0.1.41")]
65
#![cfg_attr(feature = "nightly", feature(plugin))]
76
#![cfg_attr(feature = "lints", plugin(clippy))]
87
#![cfg_attr(feature = "lints", deny(warnings))]
@@ -167,10 +166,10 @@ fn items2chars<'a>(modules: Vec<Module>) -> io::Result<Vec<u8>> {
167166
///
168167
/// # Examples
169168
/// ```
170-
/// extern crate mml;
169+
/// extern crate rust2uml;
171170
///
172171
/// fn main() {
173-
/// let _ = mml::rs2dot("src/lib.rs");
172+
/// let _ = rust2uml::rs2dot("src/lib.rs");
174173
/// }
175174
/// ```
176175
pub fn rs2dot<'a, P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> {
@@ -188,10 +187,10 @@ pub fn rs2dot<'a, P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> {
188187
///
189188
/// # Examples
190189
/// ```
191-
/// extern crate mml;
190+
/// extern crate rust2uml;
192191
///
193192
/// fn main() {
194-
/// let _ = mml::src2dot("src");
193+
/// let _ = rust2uml::src2dot("src");
195194
/// }
196195
/// ```
197196
pub fn src2dot<'a, P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> {
@@ -237,10 +236,10 @@ fn content2svg(buf: Vec<u8>) -> io::Result<Vec<u8>> {
237236
///
238237
/// # Examples
239238
/// ```
240-
/// extern crate mml;
239+
/// extern crate rust2uml;
241240
///
242241
/// fn main() {
243-
/// let _ = mml::rs2svg("src/lib.rs");
242+
/// let _ = rust2uml::rs2svg("src/lib.rs");
244243
/// }
245244
/// ```
246245
pub fn rs2svg<P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> {
@@ -253,10 +252,10 @@ pub fn rs2svg<P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> {
253252
///
254253
/// # Examples
255254
/// ```
256-
/// extern crate mml;
255+
/// extern crate rust2uml;
257256
///
258257
/// fn main() {
259-
/// let _ = mml::src2svg("src");
258+
/// let _ = rust2uml::src2svg("src");
260259
/// }
261260
/// ```
262261
pub fn src2svg<P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> {
@@ -269,12 +268,12 @@ pub fn src2svg<P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> {
269268
///
270269
/// # Examples
271270
/// ```
272-
/// extern crate mml;
271+
/// extern crate rust2uml;
273272
///
274273
/// fn main() {
275274
/// let dest: String = concat!("target/doc/", env!("CARGO_PKG_NAME")).to_string();
276275
///
277-
/// let _ = mml::src2both("src", dest.replace("-", "_").as_str());
276+
/// let _ = rust2uml::src2both("src", dest.replace("-", "_").as_str());
278277
/// }
279278
/// ```
280279
pub fn src2both<P: AsRef<Path>>(src: P, dest: P) -> io::Result<()> {

tests/aggregation.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![allow(dead_code)]
2-
extern crate mml;
2+
extern crate rust2uml;
33

44
struct Amut {
55
b: *mut B,
@@ -15,7 +15,7 @@ struct B {
1515
#[test]
1616
fn test_aggregation() {
1717
assert_eq!(
18-
String::from_utf8(mml::rs2dot("tests/aggregation.rs").unwrap()).unwrap(),
18+
String::from_utf8(rust2uml::rs2dot("tests/aggregation.rs").unwrap()).unwrap(),
1919
r#"digraph ml {
2020
ndAmut[label="{&lt;&lt;&lt;Structure&gt;&gt;&gt;\nAmut|- b: *mut B}"][shape="record"];
2121
ndAconst[label="{&lt;&lt;&lt;Structure&gt;&gt;&gt;\nAconst|- b: *const B}"][shape="record"];

tests/association.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![allow(dead_code)]
2-
extern crate mml;
2+
extern crate rust2uml;
33

44
struct A {
55
}
@@ -34,7 +34,7 @@ impl B {
3434
#[test]
3535
fn test_association() {
3636
assert_eq!(
37-
String::from_utf8(mml::rs2dot("tests/association.rs").unwrap()).unwrap(),
37+
String::from_utf8(rust2uml::rs2dot("tests/association.rs").unwrap()).unwrap(),
3838
r#"digraph ml {
3939
ndA[label="{&lt;&lt;&lt;Structure&gt;&gt;&gt;\nA|- b() -&gt; B}"][shape="record"];
4040
ndAb[label="{&lt;&lt;&lt;Structure&gt;&gt;&gt;\nAb|- b() -&gt; B}"][shape="record"];

tests/composition.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![allow(dead_code)]
22

3-
extern crate mml;
3+
extern crate rust2uml;
44

55
struct A {
66
b: B,
@@ -12,7 +12,7 @@ struct B {
1212
#[test]
1313
fn test_composition() {
1414
assert_eq!(
15-
String::from_utf8(mml::rs2dot("tests/composition.rs").unwrap()).unwrap(),
15+
String::from_utf8(rust2uml::rs2dot("tests/composition.rs").unwrap()).unwrap(),
1616
r#"digraph ml {
1717
ndA[label="{&lt;&lt;&lt;Structure&gt;&gt;&gt;\nA|- b: B}"][shape="record"];
1818
ndB[label="{&lt;&lt;&lt;Structure&gt;&gt;&gt;\nB}"][shape="record"];

tests/dependency.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![allow(dead_code, unused_variables)]
2-
extern crate mml;
2+
extern crate rust2uml;
33

44
struct A {
55
}
@@ -15,7 +15,7 @@ struct B {
1515
#[test]
1616
fn test_dependency() {
1717
assert_eq!(
18-
String::from_utf8(mml::rs2dot("tests/dependency.rs").unwrap()).unwrap(),
18+
String::from_utf8(rust2uml::rs2dot("tests/dependency.rs").unwrap()).unwrap(),
1919
r#"digraph ml {
2020
ndA[label="{&lt;&lt;&lt;Structure&gt;&gt;&gt;\nA|- b(b: &amp;B)}"][shape="record"];
2121
ndB[label="{&lt;&lt;&lt;Structure&gt;&gt;&gt;\nB}"][shape="record"];

tests/realization.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![allow(dead_code, unused_variables)]
2-
extern crate mml;
2+
extern crate rust2uml;
33

44
use std::fmt::Debug;
55

@@ -34,7 +34,7 @@ impl <T>B<T> {
3434

3535
#[test]
3636
fn test_realization() {
37-
assert_eq!(String::from_utf8(mml::rs2dot("tests/realization.rs").unwrap()).unwrap(),
37+
assert_eq!(String::from_utf8(rust2uml::rs2dot("tests/realization.rs").unwrap()).unwrap(),
3838
r#"digraph ml {
3939
ndA[label="{&lt;&lt;&lt;Structure&gt;&gt;&gt;\nA|- a: T|- a(a: T) -&gt; Self}"][shape="record"];
4040
ndB[label="{&lt;&lt;&lt;Trait&gt;&gt;&gt;\nB|a(&amp;Self) -&gt; Option&lt;T&gt;|- a(&amp;self) -&gt; Option&lt;T&gt;}"][shape="record"];

0 commit comments

Comments
 (0)