@@ -1811,7 +1811,7 @@ href="https://doc.rust-lang.org/${channel}/rustdoc/read-documentation/search.htm
1811
1811
// from settings.js, which uses a separate function. It's done here because
1812
1812
// the minimum sidebar size is rather uncomfortable, and it must pass
1813
1813
// through that size when using the shrink-to-nothing gesture.
1814
- const hideSidebar = function hideSidebar ( ) {
1814
+ const hideSidebar = function ( ) {
1815
1815
if ( isSrcPage ) {
1816
1816
window . rustdocCloseSourceSidebar ( ) ;
1817
1817
updateLocalStorage ( "src-sidebar-width" , null ) ;
@@ -1844,7 +1844,7 @@ href="https://doc.rust-lang.org/${channel}/rustdoc/read-documentation/search.htm
1844
1844
// the visible range without releasing it. You can, however, grab the
1845
1845
// resize handle on a source page with the sidebar closed, because it
1846
1846
// remains visible all the time on there.
1847
- const showSidebar = function showSidebar ( ) {
1847
+ const showSidebar = function ( ) {
1848
1848
if ( isSrcPage ) {
1849
1849
window . rustdocShowSourceSidebar ( ) ;
1850
1850
} else {
@@ -1859,7 +1859,7 @@ href="https://doc.rust-lang.org/${channel}/rustdoc/read-documentation/search.htm
1859
1859
*
1860
1860
* @param {number } size - CSS px width of the sidebar.
1861
1861
*/
1862
- const changeSidebarSize = function changeSidebarSize ( size ) {
1862
+ const changeSidebarSize = function ( size ) {
1863
1863
if ( isSrcPage ) {
1864
1864
updateLocalStorage ( "src-sidebar-width" , size . toString ( ) ) ;
1865
1865
// [RUSTDOCIMPL] CSS variable fast path
@@ -1879,11 +1879,11 @@ href="https://doc.rust-lang.org/${channel}/rustdoc/read-documentation/search.htm
1879
1879
1880
1880
// Check if the sidebar is hidden. Since src pages and doc pages have
1881
1881
// different settings, this function has to check that.
1882
- function isSidebarHidden ( ) {
1882
+ const isSidebarHidden = function ( ) {
1883
1883
return isSrcPage ?
1884
1884
! hasClass ( document . documentElement , "src-sidebar-expanded" ) :
1885
1885
hasClass ( document . documentElement , "hide-sidebar" ) ;
1886
- }
1886
+ } ;
1887
1887
1888
1888
/**
1889
1889
* Respond to the resize handle event.
@@ -1892,7 +1892,7 @@ href="https://doc.rust-lang.org/${channel}/rustdoc/read-documentation/search.htm
1892
1892
*
1893
1893
* @param {PointerEvent } e
1894
1894
*/
1895
- function resize ( e ) {
1895
+ const resize = function ( e ) {
1896
1896
if ( currentPointerId === null || currentPointerId !== e . pointerId ) {
1897
1897
return ;
1898
1898
}
@@ -1923,7 +1923,7 @@ href="https://doc.rust-lang.org/${channel}/rustdoc/read-documentation/search.htm
1923
1923
) ;
1924
1924
} , 100 ) ;
1925
1925
}
1926
- }
1926
+ } ;
1927
1927
// Respond to the window resize event.
1928
1928
window . addEventListener ( "resize" , ( ) => {
1929
1929
if ( window . innerWidth < RUSTDOC_MOBILE_BREAKPOINT ) {
@@ -1940,7 +1940,7 @@ href="https://doc.rust-lang.org/${channel}/rustdoc/read-documentation/search.htm
1940
1940
/**
1941
1941
* @param {PointerEvent= } e
1942
1942
*/
1943
- const stopResize = function stopResize ( e ) {
1943
+ const stopResize = function ( e ) {
1944
1944
if ( currentPointerId === null ) {
1945
1945
return ;
1946
1946
}
@@ -1962,7 +1962,7 @@ href="https://doc.rust-lang.org/${channel}/rustdoc/read-documentation/search.htm
1962
1962
/**
1963
1963
* @param {PointerEvent } e
1964
1964
*/
1965
- const initResize = function initResize ( e ) {
1965
+ const initResize = function ( e ) {
1966
1966
if ( currentPointerId !== null || e . altKey || e . ctrlKey || e . metaKey || e . button !== 0 ) {
1967
1967
return ;
1968
1968
}
0 commit comments