Skip to content

Commit

Permalink
Make unwanted pub functions as private
Browse files Browse the repository at this point in the history
Update doc strings
Release `v1.0.0`
  • Loading branch information
dormant-user committed Feb 21, 2024
1 parent b3f96df commit ce5ba14
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/none.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
- main
paths-ignore:
- '.github/**'
- 'src/**'
- 'Cargo.toml'

jobs:
none-shall-pass:
Expand Down
7 changes: 1 addition & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# https://doc.rust-lang.org/cargo/getting-started/first-steps.html#first-steps-with-cargo
[package]
name = "RuStream"
version = "1.0.0-a"
version = "1.0.0"
description = "Self-hosted Streaming Engine, that can render videos via authenticated sessions."
license = "MIT"
documentation = "https://docs.rs/RuStream"
Expand All @@ -23,10 +22,6 @@ path = "src/lib.rs"
name = "rustream"
path = "src/main.rs"

# https://docs.rs/releases/queue
# https://docs.rs/about/metadata
# https://doc.rust-lang.org/cargo/reference/config.html?highlight=RUSTDOCFLAGS
# export RUSTDOCFLAGS="document-private-items no-deps"
[package.metadata.docs.rs]
rustdoc-args = ["--document-private-items"]

Expand Down
2 changes: 1 addition & 1 deletion src/routes/video.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct Subtitles {
///
/// * `path` - The input path string to be URL encoded.
///
/// # References:
/// ## References
/// - [RustJobs](https://rustjobs.dev/blog/how-to-url-encode-strings-in-rust/)
///
/// # Returns
Expand Down
6 changes: 3 additions & 3 deletions src/squire/secure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use sha2::{Digest, Sha512};
///
/// A hexadecimal string representing the SHA-512 hash value.
///
/// ## References:
/// ## References
/// - [Official docs](https://docs.rs/sha2/latest/sha2/#usage)
pub fn calculate_hash(value: String) -> String {
let mut hasher = Sha512::new();
Expand All @@ -37,7 +37,7 @@ pub fn calculate_hash(value: String) -> String {
///
/// A Base64-encoded ASCII string.
///
/// ## References:
/// ## References
/// - [Official docs](https://docs.rs/base64/latest/base64/#url-safe-alphabet)
#[allow(dead_code)] // Just for reference
pub fn base64_encode(value: &str) -> String {
Expand All @@ -56,7 +56,7 @@ pub fn base64_encode(value: &str) -> String {
///
/// A `Result` containing the decoded string or an error message.
///
/// ## References:
/// ## References
/// - [Official Docs](https://docs.rs/base64/latest/base64/#url-safe-alphabet)
pub fn base64_decode(value: &str) -> Result<String, &'static str> {
if let Ok(decoded_bytes) = URL_SAFE.decode(value) {
Expand Down
12 changes: 6 additions & 6 deletions src/templates/mod.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
use std::sync::{Arc, Mutex};

/// Index page template that is served as HTML response for the root endpoint.
pub mod index;
mod index;
/// Landing page template that is served as HTML response while streaming videos.
pub mod landing;
mod landing;
/// Listing page template that is served as HTML response after successful authentication.
pub mod listing;
mod listing;
/// Logout page template that is served as HTML response when the user decides to end the session.
pub mod logout;
mod logout;
/// Session page template that is served as HTML response when invalid/expired session tokens are received.
pub mod session;
mod session;
/// Unauthorized page template that is served as HTML response after failed authentication.
pub mod unauthorized;
mod unauthorized;

/// Loads all the HTML templates' content into a Jinja Environment
pub fn environment() -> Arc<Mutex<minijinja::Environment<'static>>> {
Expand Down

0 comments on commit ce5ba14

Please sign in to comment.