summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Hein <hein@kde.org>2015-05-16 23:29:00 +0000
committerBastien Nocera <hadess@hadess.net>2015-05-18 12:25:52 +0200
commitf75cbe0d37c990580dbb6f0694b53bc0c914d933 (patch)
treef07da5f4b2234923d43d800028b138195e69224f
parent5bd74344a762cb8d36dda35427edd004f23b3be3 (diff)
Add text/rust for Rust source code
https://bugs.freedesktop.org/show_bug.cgi?id=90487
-rw-r--r--freedesktop.org.xml.in5
-rw-r--r--tests/list1
-rw-r--r--tests/test.rs3
3 files changed, 9 insertions, 0 deletions
diff --git a/freedesktop.org.xml.in b/freedesktop.org.xml.in
index d03bf36..e113732 100644
--- a/freedesktop.org.xml.in
+++ b/freedesktop.org.xml.in
@@ -3153,6 +3153,11 @@ command to generate the output files.
<generic-icon name="text-x-script"/>
<glob pattern="*.mab"/>
</mime-type>
+ <mime-type type="text/rust">
+ <_comment>Rust source code</_comment>
+ <sub-class-of type="text/plain"/>
+ <glob pattern="*.rs"/>
+ </mime-type>
<mime-type type="application/x-sc">
<_comment>SC/Xspread spreadsheet</_comment>
<generic-icon name="x-office-spreadsheet"/>
diff --git a/tests/list b/tests/list
index 6524ebc..2ad7eb8 100644
--- a/tests/list
+++ b/tests/list
@@ -294,6 +294,7 @@ test.pm application/x-perl
test.t application/x-perl
# Copied from http://en.wikipedia.org/wiki/Turtle_%28syntax%29#Example
test.ttl text/turtle ox
+test.rs text/rust ox
# xml subtypes
../shared-mime-info-spec.xml application/x-docbook+xml xox
diff --git a/tests/test.rs b/tests/test.rs
new file mode 100644
index 0000000..e7a11a9
--- /dev/null
+++ b/tests/test.rs
@@ -0,0 +1,3 @@
+fn main() {
+ println!("Hello, world!");
+}