Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[encoding] Convert doc comment and fix doctest of SpecificCharacterSet::from_code #223

Merged
merged 1 commit into from
Feb 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions encoding/src/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,18 +157,18 @@ impl Default for SpecificCharacterSet {
}

impl SpecificCharacterSet {
/** Obtain the specific character set identified by the given code string.
*
* Supported code strings include the possible values
* in the respective DICOM element (0008, 0005).
*
* # Example
*
* ```
* let character_set = SpecificCharacterSet::from_code("ISO_IR 100");
* assert_eq!(character_set, Some(SpecificCharacterSet::IsoIr100));
* ```
*/
/// Obtain the specific character set identified by the given code string.
///
/// Supported code strings include the possible values
/// in the respective DICOM element (0008, 0005).
///
/// # Example
///
/// ```
/// # use dicom_encoding::text::SpecificCharacterSet;
/// let character_set = SpecificCharacterSet::from_code("ISO_IR 100");
/// assert_eq!(character_set, Some(SpecificCharacterSet::IsoIr100));
/// ```
pub fn from_code(uid: &str) -> Option<Self> {
use self::SpecificCharacterSet::*;
match uid.trim_end() {
Expand Down