Skip to content

Commit a123257

Browse files
author
cht
committed
use pub(super) to pub(crate)
1 parent 9de47bb commit a123257

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/informations/appbar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::{
66
};
77
use tui::Terminal;
88
pub struct AppBar<'a> {
9-
pub(crate) data: Vec<(&'a str, u64)>,
9+
pub(super) data: Vec<(&'a str, u64)>,
1010
last_tick: Instant,
1111
}
1212
use super::render::ui;

src/subscribe/appsub.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::state::{MyBackend, IFEXIT};
66
use std::io;
77
use tui::widgets::ListState;
88
use tui::Terminal;
9-
pub(crate) enum InputMode {
9+
pub(super) enum InputMode {
1010
Normal,
1111
Editing,
1212
Select,
@@ -22,7 +22,7 @@ pub struct AppSub {
2222
// settings , include coresetting and subscribe setting
2323
pub settings_input: Vec<String>,
2424
/// Current input mode
25-
pub(crate) input_mode: InputMode,
25+
pub(super) input_mode: InputMode,
2626
// History of recorded subs
2727
// subs's names
2828
pub subs: Vec<Vec<String>>,

src/subscribe/render.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use tui::{
1010
};
1111
use unicode_width::UnicodeWidthStr;
1212

13-
pub(crate) fn ui<B: Backend>(f: &mut Frame<B>, app: &mut AppSub) {
13+
pub(super) fn ui<B: Backend>(f: &mut Frame<B>, app: &mut AppSub) {
1414
let chunks = Layout::default()
1515
.direction(Direction::Vertical)
1616
.margin(2)

src/subscribe/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use super::{Page, IFEXIT};
55
use crossterm::event::{self, Event, KeyCode};
66
use std::{env, io, process::Command};
77
use tui::widgets::ListState;
8-
pub(crate) async fn subscribe_state(app: &mut AppSub) -> io::Result<IFEXIT> {
8+
pub(super) async fn subscribe_state(app: &mut AppSub) -> io::Result<IFEXIT> {
99
if let Event::Key(key) = event::read()? {
1010
match app.input_mode {
1111
InputMode::Normal => match key.code {

0 commit comments

Comments
 (0)